Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub actions #18

Merged
merged 4 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on: [push, pull_request]

jobs:
build:
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Compile DFTCalc
run: cd build && make -j$NUMCORES install
- name: Checkout DFTRES
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: utwente-fmt/DFTRES
path: DFTRES
Expand All @@ -36,7 +36,7 @@ jobs:
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@v3
uses: actions/cache@v4
with:
path: DFTRES/DFTRES.jar
key: ${{ runner.os }}-dftres-${{ steps.cache-revs.outputs.dftres }}
Expand All @@ -45,7 +45,7 @@ jobs:
run: cd DFTRES && make jar
- name: Cache IMRMC
id: cache-imrmc
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: imrmc/bin/imrmc
key: ${{ runner.os }}-imrmc-${{ steps.cache-revs.outputs.imrmc }}
Expand All @@ -60,7 +60,7 @@ jobs:
DFTRES: ${{github.workspace}}/DFTRES
run: cd test && bash test.sh --exact --imrmc
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: test-results
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Ready dependencies
run: |
curl https://www.ennoruijters.nl/package.gpg | sudo apt-key add -
echo "deb http://packages.ennoruijters.nl focal main" | sudo tee -a /etc/apt/sources.list
echo "deb http://packages.ennoruijters.nl jammy main" | sudo tee -a /etc/apt/sources.list
sudo apt update
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@v3
uses: actions/cache@v4
with:
path: apt-archive.tar
key: ${{ runner.os }}-apt-${{ env.STORM_VERSION }}
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Compile DFTCalc
run: cd build && make -j4 install
- name: Checkout DFTRES
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: utwente-fmt/DFTRES
path: DFTRES
Expand All @@ -49,7 +49,7 @@ jobs:
echo "imrmc-march=$(gcc -march=native -E -v - </dev/null 2>&1 | grep cc1 | sha256sum | grep -o '^[0-9a-z]\+')" >> $GITHUB_OUTPUT
- name: Cache DFTRES
id: cache-dftres
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: DFTRES/DFTRES.jar
key: ${{ runner.os }}-dftres-${{ steps.cache-revs.outputs.dftres }}
Expand All @@ -58,7 +58,7 @@ jobs:
run: cd DFTRES && make jar
- name: Cache IMRMC
id: cache-imrmc
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: imrmc/bin/imrmc
key: ${{ runner.os }}-imrmc-${{ steps.cache-revs.outputs.imrmc }}-${{ steps.cache-revs.outputs.imrmc-march }}
Expand All @@ -73,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@v3
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: test-results
Expand Down
40 changes: 19 additions & 21 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: dftcalc
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: microsoft
- name: Checkout yaml-cpp
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: jbeder/yaml-cpp
path: yaml-cpp
- name: Checkout DFTRES
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: utwente-fmt/DFTRES
path: DFTRES
Expand All @@ -33,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@v3
uses: actions/cache@v4
with:
path: |
yaml-cpp/yaml-cpp.dll
Expand All @@ -42,15 +42,14 @@ jobs:
- name: Compile yaml-cpp if not cached
if: steps.cache-yaml-cpp.outputs.cache-hit != 'true'
run: |
& "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 ..
ninja yaml-cpp.dll
copy yaml-cpp.dll,yaml-cpp.lib ..
cd yaml-cpp
cmake -B build -DYAML_BUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel --verbose --config Release
copy build\Release\yaml-cpp.dll .
copy build\Release\yaml-cpp.lib .
- name: Cache DFTRES
id: cache-dftres
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: DFTRES\DFTRES.jar
key: ${{ runner.os }}-DFTRES-${{ env.DFTRES_REV }}
Expand All @@ -68,7 +67,7 @@ jobs:
java -jar DFTRES.jar --version
- name: Try to load win-flex and win-bison
id: cache-flex
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: win_flex_bison-2.5.23.zip
key: ${{ runner.os }}-flex-2.5.53
Expand All @@ -83,7 +82,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@v3
uses: actions/cache@v4
with:
path: imrmc\imrmc.exe
key: ${{ runner.os }}-imrmc-${{ env.IMRMC_REV }}
Expand All @@ -93,16 +92,15 @@ jobs:
- name: Compile IMRMC
if: steps.cache-imrmc.outputs.cache-hit != 'true'
run: |
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1"
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1" -SkipAutomaticLocation
cd imrmc
nmake /F makefile.win imrmc.exe
- name: Build DFTCalc
run: |
& "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" ..
ninja
cd dftcalc
cmake -B build -DCMAKE_PREFIX_PATH="$Env:GITHUB_WORKSPACE\yaml-cpp" -DCMAKE_INCLUDE_PATH="$Env:GITHUB_WORKSPACE\yaml-cpp" -DDFTROOT="$Env:GITHUB_WORKSPACE\dftcalc"
cmake --build build --parallel --verbose --config Release
cmake --install build --verbose --config Release
- name: Set PATH
run: |
"$Env:GITHUB_WORKSPACE\imrmc" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Expand All @@ -115,7 +113,7 @@ jobs:
cd dftcalc\test
.\test.ps1 --imrmc
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: dftcalc
Expand Down