feat: add msm without serialization #2
Workflow file for this run
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: CI Pull Request | |
on: | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: write | |
jobs: | |
install: | |
name: Rust (${{matrix.os}}) | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
os: [ubuntu-latest] | |
cabal: [3.10.2.1] | |
ghc: [9.6.3] | |
rust: | |
- null | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Set up Haskell | |
uses: haskell-actions/[email protected] | |
id: setup | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
cabal-update: true | |
- name: Set up cbindgen | |
run: | | |
cargo install --force cbindgen | |
- name: Set up cargo-c | |
run: | | |
cargo install cargo-c | |
- name: Configure Cabal | |
run: | | |
cabal configure --enable-tests --enable-benchmarks --enable-documentation | |
- name: Build rust wrapper | |
run: | | |
source ./run.sh | |
- name: Generate cache key | |
# Creates plan.json file | |
run: | | |
cabal build all --dry-run | |
- name: Restore cached dependencies | |
uses: actions/cache/[email protected] | |
id: cache | |
env: | |
key: ${{ matrix.os }}-ghc-${{ matrix.ghc }}-cabal-${{ matrix.cabal }} | |
with: | |
path: ${{ steps.setup.outputs.cabal-store }} | |
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }} | |
restore-keys: ${{ env.key }}- | |
- name: Install stylish-haskell | |
run: | | |
cabal install stylish-haskell | |
- name: Lint Haskell | |
run: | | |
find . -name '*.hs' -exec sh -c 'for file do stylish-haskell --inplace "$file"; done' sh {} + | |
- name: Auto-commit lint | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: stylish-haskell auto-commit | |
commit_user_name: GitHub Action | |
commit_user_email: [email protected] | |
branch: ${{ github.head_ref }} | |
- name: Install dependencies | |
# If we had an exact cache hit, the dependencies will be up to date. | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
cabal build all --only-dependencies | |
# Cache dependencies already here, so that we do not have to rebuild them should the subsequent steps fail. | |
- name: Save cached dependencies | |
uses: actions/cache/[email protected] | |
# If we had an exact cache hit, trying to save the cache would error because of key clash. | |
if: steps.cache.outputs.cache-hit != 'true' | |
with: | |
path: ${{ steps.setup.outputs.cabal-store }} | |
key: ${{ steps.cache.outputs.cache-primary-key }} | |
- name: Build | |
run: | | |
cabal build all -f Pedantic | |
# - name: Test | |
# run: cabal test all | |
# - name: Check cabal file | |
# run: cabal check | |
# - name: Document package | |
# run: cabal haddock all | |
# - name: Prepare package for publishing | |
# run: cabal sdist all |