Skip to content

Commit d0528ef

Browse files
committed
Update GHA CI to current realities.
1 parent 8f65c71 commit d0528ef

File tree

5 files changed

+120
-80
lines changed

5 files changed

+120
-80
lines changed

.github/workflows/apple.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
name: "MacOS clang -std=c++${{matrix.cxxstd}}"
2020
runs-on: macos-latest
2121
strategy:
22-
fail-fast: true
22+
fail-fast: false
2323
matrix:
2424
cxxstd: [20,23]
2525

.github/workflows/clangtidy.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ on:
1717
jobs:
1818
check:
1919
name: Linux Clang-Tidy
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
2323

2424
- name: Install Clang 11
2525
run: sudo apt-get update && sudo apt-get install -y clang-11 clang-tidy-11
2626

27+
- name: Setup
28+
run: sudo apt-get update && sudo apt-get -y install sudo python3 git g++ curl xz-utils
29+
2730
- name: "Install Boost from Source"
2831
run: |
2932
cd ..
@@ -40,7 +43,8 @@ jobs:
4043
- name: "Print Clang-Tidy Report"
4144
run: cat reports.txt
4245

43-
- uses: actions/setup-python@v2
46+
- uses: actions/setup-python@v5
47+
with: { 'python-version': '3' }
4448

4549
- name: "Post review comments"
4650
if: github.event.pull_request.head.repo.full_name == github.repository

.github/workflows/linux.yml

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,78 +5,96 @@
55

66
name: "Linux"
77

8-
on:
8+
on:
99
push:
10-
paths-ignore:
10+
paths-ignore:
1111
- '**.md'
1212
- 'doc/**'
1313
pull_request:
14-
paths-ignore:
14+
paths-ignore:
1515
- '**.md'
1616
- 'doc/**'
1717

1818
jobs:
1919
build:
20-
name: Ubuntu 20.04 "cxx=${{matrix.config.cxx}}, std=c++${{matrix.config.cxxstd}}, variant=c++${{matrix.config.variant}}"
21-
runs-on: ubuntu-20.04
20+
name: Ubuntu "cxx=${{matrix.config.cxx}}, std=c++${{matrix.config.cxxstd}}, variant=c++${{matrix.config.variant}}"
21+
runs-on: ubuntu-latest
22+
container:
23+
image: ${{matrix.container}}
24+
volumes:
25+
- /node20217:/node20217:rw,rshared
26+
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
2227
strategy:
23-
fail-fast: true
28+
fail-fast: false
2429
# If any compiler fails to compile, continue CI for next compiler in matrix instead of failing early
2530
matrix:
26-
config:
27-
- { name: clang, cc: clang-10, cxx: clang++-10, cxxstd: 20, variant: debug, opt: off}
28-
- { name: clang, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: debug, opt: off}
29-
- { name: clang, cc: clang-10, cxx: clang++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp, ldflags: -lgomp=libomp5}
30-
- { name: clang, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp, ldflags: -lgomp=libomp5}
31-
- { name: gcc, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: debug, opt: off}
32-
- { name: gcc, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp, ldflags: -lgomp}
33-
31+
config:
32+
- { name: clang, cc: clang-10, cxx: clang++-10, cxxstd: 20, variant: debug, opt: off, container: ubuntu:20.04 }
33+
- { name: clang, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: debug, opt: off, container: ubuntu:20.04 }
34+
- { name: clang, cc: clang-10, cxx: clang++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp, ldflags: -lgomp=libomp5, container: ubuntu:20.04 }
35+
- { name: clang, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp, ldflags: -lgomp=libomp5, container: ubuntu:20.04 }
36+
- { name: gcc, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: debug, opt: off, container: ubuntu:20.04 }
37+
- { name: gcc, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp, ldflags: -lgomp, container: ubuntu:20.04 }
38+
3439
steps:
35-
- uses: actions/checkout@v2
36-
40+
- name: Setup container environment
41+
if: matrix.container
42+
run: |
43+
apt-get update
44+
apt-get -y install sudo python3 git g++ curl xz-utils
45+
46+
- name: Install nodejs20glibc2.17
47+
if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }}
48+
run: |
49+
curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz
50+
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
51+
ldd /__e/node20/bin/node
52+
3753
- name: Install g++-10
3854
if: matrix.config.cxx == 'g++-10'
39-
run: sudo apt update && sudo apt-get install -y g++-10 libomp-dev
40-
55+
run: sudo apt update && sudo apt-get install -y g++-10 libomp-dev
56+
4157
- name: Install Clang 10
4258
if: matrix.config.cxx == 'clang++-10'
4359
run: sudo apt-get update && sudo apt-get install -y clang-10
44-
60+
4561
- name: Install Clang 11
4662
if: matrix.config.cxx == 'clang++-11'
4763
run: sudo apt-get update && sudo apt-get install -y clang-11
48-
64+
65+
- uses: actions/checkout@v4
66+
4967
- name: Git Clone Boost.uBlas
5068
run: |
5169
cd ${GITHUB_WORKSPACE}
5270
cd ..
53-
71+
5472
git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
5573
cd boost-root
5674
echo "BOOST_ROOT=${PWD}" >> ${GITHUB_ENV}
5775
echo $BOOST_ROOT
58-
76+
5977
git submodule update --init --depth=1 --jobs 8 tools/build
6078
git submodule update --init --depth=1 --jobs 8 libs/config
6179
git submodule update --init --depth=1 --jobs 8 tools/boostdep
62-
80+
6381
mkdir -p libs/numeric/
6482
cp -rp ${GITHUB_WORKSPACE}/. libs/numeric/ublas
65-
python tools/boostdep/depinst/depinst.py -g " --depth=1" -I benchmarks numeric/ublas
83+
python3 tools/boostdep/depinst/depinst.py -g " --depth=1" -I benchmarks numeric/ublas
6684
6785
- name: Bootstrap Boost and Compile Boost
6886
run: |
6987
cd $BOOST_ROOT
7088
./bootstrap.sh
7189
./b2 -j8 headers
7290
echo "using ${{ matrix.config.name }} : : ${{ matrix.config.cxx }} ;" >> ~/user-config.jam;
73-
91+
7492
# - name: Test Benchmarks
7593
# run: |
7694
# cd $BOOST_ROOT
7795
# cd libs/numeric/ublas
7896
# $BOOST_ROOT/b2 -j 4 benchmarks toolset=clang cxxstd=${{matrix.config.cxxstd}} cxxflags="-O3"
79-
97+
8098
- name: Test Tensor Examples
8199
run: |
82100
cd $BOOST_ROOT/libs/numeric/ublas
@@ -86,7 +104,7 @@ jobs:
86104
else
87105
$BOOST_ROOT/b2 -j8 examples/tensor toolset=${{matrix.config.name}} cxxstd=${{matrix.config.cxxstd}} variant=${{matrix.config.variant}} optimization=${{matrix.config.opt}} cxxflags="${{matrix.config.cxxflags}}" linkflags="${{matrix.config.ldflags}}"
88106
fi
89-
107+
90108
- name: Test Tensor Unit-Tests
91109
run: |
92110
cd $BOOST_ROOT/libs/numeric/ublas
@@ -95,5 +113,5 @@ jobs:
95113
$BOOST_ROOT/b2 -j8 test/tensor toolset=${{matrix.config.name}} cxxstd=${{matrix.config.cxxstd}} variant=${{matrix.config.variant}} optimization=${{matrix.config.opt}}
96114
else
97115
$BOOST_ROOT/b2 -j8 test/tensor toolset=${{matrix.config.name}} cxxstd=${{matrix.config.cxxstd}} variant=${{matrix.config.variant}} optimization=${{matrix.config.opt}} cxxflags="${{matrix.config.cxxflags}}" linkflags="${{matrix.config.ldflags}}"
98-
fi
99-
116+
fi
117+

.github/workflows/sanitizer.yml

Lines changed: 43 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,57 +5,75 @@
55

66
name: "Clang Sanitizer"
77

8-
on:
8+
on:
99
push:
10-
paths-ignore:
10+
paths-ignore:
1111
- '**.md'
1212
- 'doc/**'
1313
pull_request:
14-
paths-ignore:
14+
paths-ignore:
1515
- '**.md'
1616
- 'doc/**'
1717
jobs:
1818
build:
1919
name: "${{matrix.config.name}} with ${{matrix.config.description}} sanitizer with std=${{matrix.config.cxx}} and variant=${{matrix.config.variant}}"
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-latest
21+
container:
22+
image: ${{matrix.container}}
23+
volumes:
24+
- /node20217:/node20217:rw,rshared
25+
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
2126
strategy:
2227
fail-fast: false
2328
# If any compiler fails to compile, continue CI for next compiler in matrix instead of failing early
2429
matrix:
2530
config:
26-
- { name: clang, description: address and leak, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: debug, opt: off , cxxflags: -fsanitize=address -fno-omit-frame-pointer, ldflags: -fsanitize=address }
27-
- { name: clang, description: undefined behavior, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: debug, opt: off , cxxflags: -fsanitize=undefined, ldflags: -fsanitize=undefined }
28-
- { name: clang, description: thread, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: debug, opt: off , cxxflags: -fsanitize=thread, ldflags: -fsanitize=thread }
29-
- { name: gcc, description: address and leak, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp -fsanitize=address -fno-omit-frame-pointer, ldflags: -fsanitize=address -fopenmp}
30-
# - { name: gcc, description: undefined behavior, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp -fsanitize=undefined, ldflags: -fsanitize=undefined -fopenmp}
31-
# - { name: gcc, description: thread, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp -fsanitize=thread, ldflags: -fsanitize=thread -fopenmp}
32-
31+
- { name: clang, description: address and leak, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: debug, opt: off , cxxflags: -fsanitize=address -fno-omit-frame-pointer, ldflags: -fsanitize=address , container: ubuntu:20.04 }
32+
- { name: clang, description: undefined behavior, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: debug, opt: off , cxxflags: -fsanitize=undefined, ldflags: -fsanitize=undefined, container: ubuntu:20.04 }
33+
- { name: clang, description: thread, cc: clang-11, cxx: clang++-11, cxxstd: 20, variant: debug, opt: off , cxxflags: -fsanitize=thread, ldflags: -fsanitize=thread , container: ubuntu:20.04 }
34+
- { name: gcc, description: address and leak, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp -fsanitize=address -fno-omit-frame-pointer, ldflags: -fsanitize=address -fopenmp, container: ubuntu:20.04 }
35+
# - { name: gcc, description: undefined behavior, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp -fsanitize=undefined, ldflags: -fsanitize=undefined -fopenmp, container: ubuntu:20.04 }
36+
# - { name: gcc, description: thread, cc: gcc-10, cxx: g++-10, cxxstd: 20, variant: release, opt: speed, cxxflags: -fopenmp -fsanitize=thread, ldflags: -fsanitize=thread -fopenmp, container: ubuntu:20.04 }
37+
3338
steps:
34-
- uses: actions/checkout@v2
35-
39+
- name: Setup container environment
40+
if: matrix.container
41+
run: |
42+
apt-get update
43+
apt-get -y install sudo python3 git g++ curl xz-utils
44+
45+
- name: Install nodejs20glibc2.17
46+
if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }}
47+
run: |
48+
curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz
49+
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
50+
ldd /__e/node20/bin/node
51+
3652
- name: Install Clang 11
3753
run: sudo apt-get update && sudo apt-get install -y clang-11 clang-tools-11
3854

3955
- name: Install GCC 10
4056
run: sudo apt-get update && sudo apt-get install -y g++-10 libomp-dev
41-
57+
58+
- uses: actions/checkout@v4
59+
4260
- name: Git Clone Boost.uBlas
4361
run: |
4462
cd ${GITHUB_WORKSPACE}
4563
cd ..
46-
64+
4765
git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
4866
cd boost-root
4967
echo "BOOST_ROOT=${PWD}" >> ${GITHUB_ENV}
5068
echo $BOOST_ROOT
51-
69+
5270
git submodule update --init --depth=1 --jobs 8 tools/build
5371
git submodule update --init --depth=1 --jobs 8 libs/config
5472
git submodule update --init --depth=1 --jobs 8 tools/boostdep
55-
73+
5674
mkdir -p libs/numeric/
5775
cp -rp ${GITHUB_WORKSPACE}/. libs/numeric/ublas
58-
python tools/boostdep/depinst/depinst.py -g " --depth=1" -I benchmarks numeric/ublas
76+
python3 tools/boostdep/depinst/depinst.py -g " --depth=1" -I benchmarks numeric/ublas
5977
6078
- name: Bootstrap Boost and Compile Boost
6179
run: |
@@ -65,19 +83,19 @@ jobs:
6583
echo "using ${{ matrix.config.name }} : : ${{ matrix.config.cxx }} ;" >> ~/user-config.jam;
6684
export ASAN_OPTIONS=symbolize=1
6785
export ASAN_OPTIONS=detect_leaks=1
68-
86+
6987
- name: Run Tensor Examples with "${{matrix.config.description}}" sanitizer
70-
run: |
71-
cd $BOOST_ROOT/libs/numeric/ublas
88+
run: |
89+
cd $BOOST_ROOT/libs/numeric/ublas
7290
ASAN_OPTIONS=detect_leaks=1
7391
ASAN_OPTIONS=symbolize=1
7492
$BOOST_ROOT/b2 -j8 examples/tensor toolset=${{matrix.config.name}} cxxstd=${{matrix.config.cxxstd}} variant=${{matrix.config.variant}} optimization=${{matrix.config.opt}} cxxflags="${{matrix.config.cxxflags}}" linkflags="${{matrix.config.ldflags}}"
75-
76-
- name: Run Tensor Tests with "${{matrix.config.description}}" sanitizer
93+
94+
- name: Run Tensor Tests with "${{matrix.config.description}}" sanitizer
7795
run: |
7896
cd $BOOST_ROOT/libs/numeric/ublas
7997
ASAN_OPTIONS=detect_leaks=1
8098
ASAN_OPTIONS=symbolize=1
8199
$BOOST_ROOT/b2 -j8 test/tensor toolset=${{matrix.config.name}} cxxstd=${{matrix.config.cxxstd}} variant=${{matrix.config.variant}} optimization=${{matrix.config.opt}} cxxflags="${{matrix.config.cxxflags}}" linkflags="${{matrix.config.ldflags}}"
82-
83-
100+
101+

0 commit comments

Comments
 (0)