haskell.nix integration #603
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: πΊ Artifacts (Native) | |
# Trigger the workflow on push or pull request, but only for the main branch | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
stack: | |
name: π₯οΈ ${{ matrix.os }} π GHC ${{ matrix.ghc }} π Stack ${{ matrix.stack }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
stack: | |
- "2.9.1" | |
ghc: | |
- "8.10.7" | |
os: | |
- macos-11 | |
- macos-12 | |
- ubuntu-20.04 | |
- ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
name: π€ Checkout | |
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' | |
- uses: haskell/actions/setup@v2 | |
name: 𧱠Set up Haskell Stack | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
stack-version: ${{ matrix.stack }} | |
- uses: actions/cache@v3 | |
name: ποΈ Cache ~/.stack | |
with: | |
path: ~/.stack | |
key: ${{ matrix.os }}-${{ matrix.ghc }}-stack-native-4 | |
- uses: ./.github/actions/secp256k1 | |
name: π¦ Build and install libsecp256k1 | |
- name: π¦ Install dependencies | |
run: | | |
stack build --no-nix --only-dependencies | |
- name: ποΈ Build | |
run: | | |
stack build --no-nix | |
- name: πΊ Upload CLI Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: fission-cli-${{ matrix.os }} | |
path: ./.stack-work/**/bin/fission | |
- name: πΊ Upload Server Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: fission-server-${{ matrix.os }} | |
path: ./.stack-work/**/bin/fission-server |