From ce86a04adf68eb140be8108236deb07984bd56fa Mon Sep 17 00:00:00 2001 From: Masahiro Sakai Date: Tue, 21 May 2024 08:29:17 +0900 Subject: [PATCH] GitHub Actions: update actions --- .github/workflows/build.yaml | 37 ++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e43214fd..e4c675b4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,6 +15,7 @@ jobs: stack_yaml: 'stack-ghc-9.4.yaml' stack_args: '--haddock --no-haddock-deps' flags: '--flag toysolver:BuildToyFMF --flag toysolver:BuildSamplePrograms --flag toysolver:BuildMiscPrograms' + platform: linux-x86_64 coveralls: false - ghc: '9.2.8' @@ -22,6 +23,7 @@ jobs: stack_yaml: 'stack-ghc-9.2.yaml' stack_args: '--haddock --no-haddock-deps' flags: '--flag toysolver:BuildToyFMF --flag toysolver:BuildSamplePrograms --flag toysolver:BuildMiscPrograms' + platform: linux-x86_64 coveralls: false - ghc: '9.0.2' @@ -29,12 +31,14 @@ jobs: stack_yaml: 'stack-ghc-9.0.yaml' stack_args: '--haddock --no-haddock-deps' flags: '--flag toysolver:BuildToyFMF --flag toysolver:BuildSamplePrograms --flag toysolver:BuildMiscPrograms' + platform: linux-x86_64 release: true - ghc: '9.0.2' os: macos-13 # Intel Mac stack_yaml: 'stack-ghc-9.0.yaml' stack_args: '' flags: '--flag toysolver:BuildToyFMF --flag toysolver:BuildSamplePrograms --flag toysolver:BuildMiscPrograms' + platform: macos coveralls: false release: true @@ -45,6 +49,7 @@ jobs: stack_yaml: 'stack-ghc-8.10.yaml' stack_args: '' flags: '--flag toysolver:BuildToyFMF --flag toysolver:BuildSamplePrograms --flag toysolver:BuildMiscPrograms' + platform: win64 coveralls: false release: true @@ -53,6 +58,7 @@ jobs: stack_yaml: 'stack-ghc-8.8.yaml' stack_args: '--coverage' flags: '--flag toysolver:BuildToyFMF --flag toysolver:BuildSamplePrograms --flag toysolver:BuildMiscPrograms' + platform: linux-x86_64 coveralls: true - ghc: '8.6.3' @@ -60,14 +66,15 @@ jobs: stack_yaml: 'stack-windows-i386.yaml' stack_args: '' flags: '--flag toysolver:BuildToyFMF --flag toysolver:BuildSamplePrograms --flag toysolver:BuildMiscPrograms' + platform: win32 coveralls: false release: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: true - - uses: haskell/actions/setup@v1 + - uses: haskell-actions/setup@v2 id: setup-haskell name: Setup Haskell with: @@ -87,7 +94,7 @@ jobs: sudo apt-get update sudo apt-get install ocl-icd-opencl-dev - - uses: actions/cache@v3 + - uses: actions/cache@v4 name: Cache ~/.stack with: path: ${{ steps.setup-haskell.outputs.stack-root }} @@ -153,12 +160,14 @@ jobs: run: stack runhaskell ${{ matrix.stack_args }} misc/generate_packageVersions.hs > /dev/null - name: Build artifacts + id: build-artifact run: stack runhaskell ${{ matrix.stack_args }} --package turtle misc/build_artifacts.hs - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 + if: matrix.release with: - name: binary-packages + name: binary-packages-${{ matrix.platform }} path: | *.tar.xz *.7z @@ -170,13 +179,25 @@ jobs: if: startsWith(github.ref, 'refs/tags') needs: build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: - name: binary-packages + name: binary-packages-linux-x86_64 + path: binary-packages + - uses: actions/download-artifact@v4 + with: + name: binary-packages-macos + path: binary-packages + - uses: actions/download-artifact@v4 + with: + name: binary-packages-win32 + path: binary-packages + - uses: actions/download-artifact@v4 + with: + name: binary-packages-win64 path: binary-packages - name: Upload artifacts to GitHub Release