Skip to content

Commit 462d0ea

Browse files
committed
Add workflow to test all gcc versions
1 parent ac1a481 commit 462d0ea

File tree

2 files changed

+48
-3
lines changed

2 files changed

+48
-3
lines changed

.github/workflows/check-build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
brew install tcl-tk
4545
brew install openmotif
4646
47-
- name: Check versions
47+
- name: Compiler versions
4848
run: |
4949
gfortran --version
5050
gcc --version
@@ -57,5 +57,5 @@ jobs:
5757
- name: Build EGSnrc
5858
run: |
5959
HEN_HOUSE/scripts/configure.expect ${{ runner.os }}.conf | tee configure.log
60-
cat *.log log/*.log
61-
(! grep -i fail *.log log/*.log)
60+
for f in HEN_HOUSE/log/*.log configure.log; do echo $f; cat $f; done
61+
(! grep -i fail configure.log)
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Compiler versions
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
8+
gcc-versions:
9+
name: gcc versions
10+
11+
strategy:
12+
matrix:
13+
gcc-version: [4.8, 5, 6, 7, 8, 9]
14+
os: [ubuntu-18.04]
15+
16+
runs-on: ${{ matrix.os }}
17+
18+
steps:
19+
20+
- name: Install dependencies
21+
if: matrix.os == 'ubuntu-18.04'
22+
run: |
23+
sudo apt-get update -q
24+
sudo apt remove -qy gcc g++
25+
sudo apt install gfortran
26+
sudo apt install gcc-${{ matrix.gcc-version }}
27+
sudo apt install g++-${{ matrix.gcc-version }}
28+
sudo apt-get install -qy expect
29+
sudo apt-get install -qy libmotif-dev
30+
31+
- name: Compiler versions
32+
run: |
33+
gfortran --version
34+
gcc --version
35+
g++ --version
36+
make --version
37+
38+
- name: Checkout
39+
uses: actions/checkout@v3
40+
41+
- name: Build EGSnrc
42+
run: |
43+
HEN_HOUSE/scripts/configure.expect ${{ runner.os }}.conf | tee configure.log
44+
cat *.log log/*.log
45+
(! grep -i fail *.log log/*.log)

0 commit comments

Comments
 (0)