Skip to content

Commit

Permalink
Use a strategy matrix to compile on different os
Browse files Browse the repository at this point in the history
  • Loading branch information
ftessier committed Jul 12, 2022
1 parent edea91c commit 36ac1d2
Showing 1 changed file with 19 additions and 42 deletions.
61 changes: 19 additions & 42 deletions .github/workflows/egsnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,65 +14,42 @@ on:

jobs:

build-on-ubuntu:
build:

runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

runs-on: ${{ matrix.os }}

steps:

- name: install dependencies
- name: Install dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y gfortran gcc g++
sudo apt-get install -y expect
sudo apt-get install -y grace
sudo apt-get install -y libmotif-dev
sudo apt-get install qt5-default qt5-qmake
- name: checkout
uses: actions/checkout@v3
sudo apt-get install -y qt5-default qt5-qmake
- name: configure
- name: Install dependencies
if: matrix.os == 'macos-latest;
run: |
HEN_HOUSE/scripts/configure.expect ${{ runner.os }}.conf | tee configure.log
- name: report
run: |
for f in HEN_HOUSE/log/*.log configure.log; do echo $f; cat $f; done
(! grep -i fail configure.log)
EGS_HOME=/home/runner/work/EGSnrc/EGSnrc/egs_home/
EGS_CONFIG=/home/runner/work/EGSnrc/EGSnrc/HEN_HOUSE/specs/Linux.conf
export EGS_HOME EGS_CONFIG
source /home/runner/work/EGSnrc/EGSnrc/HEN_HOUSE/scripts/egsnrc_bashrc_additions
date
build-on-macos:

runs-on: macos-latest

steps:

- name: install dependencies
run: |
# brew update
# brew install gcc
brew update
brew install gcc
which gfortran
ls -R /usr/local/Cellar
# brew install tcl-tk
# brew install xquartz
# brew install grace
# brew install openmotif
# brew install qt5
- name: checkout
- name: Checkout
uses: actions/checkout@v3

- name: configure
run: |
HEN_HOUSE/scripts/configure.expect ${{ runner.os }}.conf | tee configure.log
- name: Configure
run: HEN_HOUSE/scripts/configure.expect ${{ runner.os }}.conf | tee configure.log

- name: report
- name: Report
run: |
for f in HEN_HOUSE/log/*.log configure.log; do echo $f; cat $f; done
(! grep -i fail configure.log)
date
grep -i fail configure.log
date

0 comments on commit 36ac1d2

Please sign in to comment.