From 470613b4412afa8c18bb3d9e2358259af1c4a08f Mon Sep 17 00:00:00 2001 From: Enno Ruijters Date: Sat, 8 Apr 2023 20:27:45 +0200 Subject: [PATCH] Update github actions --- .github/workflows/mac.yml | 19 ++++++++++--------- .github/workflows/main.yml | 23 ++++++++++++----------- .github/workflows/windows.yml | 27 ++++++++++++++------------- 3 files changed, 36 insertions(+), 33 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 7fe4420..307f516 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -6,10 +6,11 @@ jobs: build: runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: - java-version: 14 + java-version: 17 + distribution: temurin - name: Install dependencies run: brew install bison flex yaml-cpp gsl - name: Set environment variables @@ -24,18 +25,18 @@ jobs: - name: Compile DFTCalc run: cd build && make -j$NUMCORES install - name: Checkout DFTRES - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: utwente-fmt/DFTRES path: DFTRES - name: Get cache revisions id: cache-revs run: | - cd DFTRES && echo "::set-output name=dftres::$(git rev-parse HEAD)" - echo "::set-output name=imrmc::$(git ls-remote git://git.ennoruijters.nl/imrmc.git | grep '\srefs/heads/master$' | grep -o '^[0-9a-z]\+')" + cd DFTRES && echo "dftres=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT + echo "imrmc=$(git ls-remote git://git.ennoruijters.nl/imrmc.git | grep '\srefs/heads/master$' | grep -o '^[0-9a-z]\+')" >> $GITHUB_OUTPUT - name: Cache DFTRES id: cache-dftres - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: DFTRES/DFTRES.jar key: ${{ runner.os }}-dftres-${{ steps.cache-revs.outputs.dftres }} @@ -44,7 +45,7 @@ jobs: run: cd DFTRES && make jar - name: Cache IMRMC id: cache-imrmc - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: imrmc/bin/imrmc key: ${{ runner.os }}-imrmc-${{ steps.cache-revs.outputs.imrmc }} @@ -59,7 +60,7 @@ jobs: DFTRES: ${{github.workspace}}/DFTRES run: cd test && bash test.sh --exact --imrmc - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ always() }} with: name: test-results diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e65a718..0ec8917 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,10 +6,11 @@ jobs: build: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 + distribution: temurin - name: Ready dependencies run: | curl https://www.ennoruijters.nl/package.gpg | sudo apt-key add - @@ -18,7 +19,7 @@ jobs: sudo apt-cache show storm | grep Version | sed -e 's/Version: /STORM_VERSION=/' >> $GITHUB_ENV sudo mkdir apt-archive - name: APT cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: apt-archive.tar key: ${{ runner.os }}-apt-${{ env.STORM_VERSION }} @@ -32,7 +33,7 @@ jobs: - name: Compile DFTCalc run: cd build && make -j4 install - name: Checkout DFTRES - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: utwente-fmt/DFTRES path: DFTRES @@ -43,12 +44,12 @@ jobs: - name: Get cache revisions id: cache-revs run: | - cd DFTRES && echo "::set-output name=dftres::$(git rev-parse HEAD)" - echo "::set-output name=imrmc::$(git ls-remote git://git.ennoruijters.nl/imrmc.git | grep '\srefs/heads/master$' | grep -o '^[0-9a-z]\+')" - echo "::set-output name=imrmc-march::$(gcc -march=native -E -v - &1 | grep cc1 | sha256sum | grep -o '^[0-9a-z]\+')" + cd DFTRES && echo "dftres=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT + echo "imrmc=$(git ls-remote git://git.ennoruijters.nl/imrmc.git | grep '\srefs/heads/master$' | grep -o '^[0-9a-z]\+')" >> $GITHUB_OUTPUT + echo "imrmc-march=$(gcc -march=native -E -v - &1 | grep cc1 | sha256sum | grep -o '^[0-9a-z]\+')" >> $GITHUB_OUTPUT - name: Cache DFTRES id: cache-dftres - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: DFTRES/DFTRES.jar key: ${{ runner.os }}-dftres-${{ steps.cache-revs.outputs.dftres }} @@ -57,7 +58,7 @@ jobs: run: cd DFTRES && make jar - name: Cache IMRMC id: cache-imrmc - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: imrmc/bin/imrmc key: ${{ runner.os }}-imrmc-${{ steps.cache-revs.outputs.imrmc }}-${{ steps.cache-revs.outputs.imrmc-march }} @@ -72,7 +73,7 @@ jobs: DFTRES: ${{github.workspace}}/DFTRES run: cd test && bash test.sh --exact --imrmc && bash test.sh --exact --storm && bash test.sh --storm - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ always() }} with: name: test-results diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index cab83c7..56ce634 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -6,19 +6,20 @@ jobs: build: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: path: dftcalc - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 + distribution: microsoft - name: Checkout yaml-cpp - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: jbeder/yaml-cpp path: yaml-cpp - name: Checkout DFTRES - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: utwente-fmt/DFTRES path: DFTRES @@ -32,7 +33,7 @@ jobs: echo "IMRMC_REV=$REV" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Try to load yaml-cpp id: cache-yaml-cpp - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | yaml-cpp/yaml-cpp.dll @@ -41,7 +42,7 @@ jobs: - name: Compile yaml-cpp if not cached if: steps.cache-yaml-cpp.outputs.cache-hit != 'true' run: | - & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\Launch-VsDevShell.ps1" + & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1" mkdir yaml-cpp/build | Out-Null cd yaml-cpp/build cmake -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DYAML_BUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release .. @@ -49,7 +50,7 @@ jobs: copy yaml-cpp.dll,yaml-cpp.lib .. - name: Cache DFTRES id: cache-dftres - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: DFTRES\DFTRES.jar key: ${{ runner.os }}-DFTRES-${{ env.DFTRES_REV }} @@ -67,7 +68,7 @@ jobs: java -jar DFTRES.jar --version - name: Try to load win-flex and win-bison id: cache-flex - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: win_flex_bison-2.5.23.zip key: ${{ runner.os }}-flex-2.5.53 @@ -82,7 +83,7 @@ jobs: "$Env:GITHUB_WORKSPACE\flex_bison" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - name: Cache IMRMC id: cache-imrmc - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: imrmc\imrmc.exe key: ${{ runner.os }}-imrmc-${{ env.IMRMC_REV }} @@ -92,12 +93,12 @@ jobs: - name: Compile IMRMC if: steps.cache-imrmc.outputs.cache-hit != 'true' run: | - & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\Launch-VsDevShell.ps1" + & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1" cd imrmc nmake /F makefile.win imrmc.exe - name: Build DFTCalc run: | - & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\Launch-VsDevShell.ps1" + & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1" mkdir dftcalc\build | Out-Null cd dftcalc\build cmake -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_PREFIX_PATH="$Env:GITHUB_WORKSPACE\yaml-cpp" -DCMAKE_INCLUDE_PATH="$Env:GITHUB_WORKSPACE\yaml-cpp" -DDFTROOT="$Env:GITHUB_WORKSPACE\dftcalc" .. @@ -114,7 +115,7 @@ jobs: cd dftcalc\test .\test.ps1 --imrmc - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ always() }} with: name: dftcalc