Skip to content

Commit

Permalink
GitHub Actions: update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
msakai committed May 21, 2024
1 parent 1c40c36 commit 778dd83
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,30 @@ 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'
os: ubuntu-latest
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'
os: ubuntu-latest
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-latest
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

Expand All @@ -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

Expand All @@ -53,21 +58,23 @@ 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'
os: windows-latest
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:
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 778dd83

Please sign in to comment.