From 36ac1d2c9800bfce3f3a945a19b84c8d1c5a6633 Mon Sep 17 00:00:00 2001 From: Frederic Tessier Date: Tue, 12 Jul 2022 14:59:43 -0400 Subject: [PATCH] Use a strategy matrix to compile on different os --- .github/workflows/egsnrc.yml | 61 +++++++++++------------------------- 1 file changed, 19 insertions(+), 42 deletions(-) diff --git a/.github/workflows/egsnrc.yml b/.github/workflows/egsnrc.yml index 6ca250c6e..e79e52613 100644 --- a/.github/workflows/egsnrc.yml +++ b/.github/workflows/egsnrc.yml @@ -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 \ No newline at end of file