Skip to content

Commit 790def9

Browse files
committed
.github/workflows: reuse the jenkins job-1-check.sh script
Signed-off-by: Brice Goglin <[email protected]>
1 parent d09d8ea commit 790def9

File tree

2 files changed

+58
-6
lines changed

2 files changed

+58
-6
lines changed

.github/workflows/buildcheck.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ jobs:
4848
uses: actions/download-artifact@v3
4949
with:
5050
name: Tarball
51-
- name: Extract
52-
run: tar xvf hwloc-*.tar.gz
51+
- name: Extract, build and check
52+
run: $GITHUB_WORKSPACE/.github/workflows/job-1-check.sh hwloc-*.tar.gz
5353
check-tarball-gh-macos-latest:
54-
name: Check tarball on GH macosx-latest
54+
name: Check tarball on GH macos-latest
5555
needs: build-tarball
56-
runs-on: macosx-latest
56+
runs-on: macos-latest
5757
steps:
5858
- name: Install dependencies
5959
run: |
@@ -63,8 +63,8 @@ jobs:
6363
uses: actions/download-artifact@v3
6464
with:
6565
name: Tarball
66-
- name: Extract
67-
run: tar xvf hwloc-*.tar.gz
66+
- name: Extract, build and check
67+
run: $GITHUB_WORKSPACE/.github/workflows/job-1-check.sh hwloc-*.tar.gz
6868
# check-tarball:
6969
# name: Check tarball on GH runners
7070
# needs: build-tarball

.github/workflows/job-1-check.sh

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/sh
2+
#
3+
# Copyright © 2012-2023 Inria. All rights reserved.
4+
# See COPYING in top-level directory.
5+
#
6+
7+
echo "############################"
8+
echo "Running on:"
9+
uname -a
10+
echo "Tarball: $1"
11+
echo "############################"
12+
13+
set -e
14+
set -x
15+
16+
# environment variables
17+
test -f $HOME/.ciprofile && . $HOME/.ciprofile
18+
19+
# extract the tarball
20+
tarball="$1"
21+
basename=$(basename $tarball .tar.gz)
22+
test -d $basename && chmod -R u+rwX $basename && rm -rf $basename
23+
tar xfz $tarball
24+
rm $tarball
25+
cd $basename
26+
27+
# ignore clock problems
28+
touch configure
29+
30+
# build without plugins, with relative VPATH
31+
mkdir build
32+
cd build
33+
../configure $HWLOC_CI_JOB1CHECK_CONFOPTS
34+
make
35+
test x$NO_CHECK = xtrue || make check
36+
utils/lstopo/lstopo-no-graphics -v
37+
cd ..
38+
39+
# build with plugins, with absolute VPATH
40+
mkdir build-plugins
41+
cd build-plugins
42+
$PWD/../configure --enable-plugins $HWLOC_CI_JOB1CHECK_CONFOPTS
43+
make
44+
test x$NO_CHECK = xtrue || make check
45+
tests/hwloc/wrapper.sh utils/lstopo/lstopo-no-graphics -v
46+
tests/hwloc/wrapper.sh utils/hwloc/hwloc-info --support
47+
cd ..
48+
49+
# check renaming
50+
test x$NO_CHECK = xtrue || (cd build/tests/hwloc/rename && make check)
51+
52+
exit 0

0 commit comments

Comments
 (0)