Skip to content

Fix LICENSE copyright years, Cabal metadata #72

Fix LICENSE copyright years, Cabal metadata

Fix LICENSE copyright years, Cabal metadata #72

Workflow file for this run

on: [push]
name: build
permissions:
contents: read
env:
SOLVER_PKG_VERSION: "snapshot-20241119"
# The NAME makes it easier to copy/paste snippets from other CI configs
NAME: stubs
jobs:
doc:
runs-on: ubuntu-latest
permissions:
# Cancel workflow
actions: write
# Upload docs
contents: write
steps:
- name: Cancel previous run
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.35'
- name: Build docs
run: |
cd docs
mdbook build
- name: Package docs
shell: bash
run: |
tar -cvf doc.tar.gz docs/book/*
- name: Upload docs artifact
uses: actions/upload-artifact@v4
if: github.repository == 'GaloisInc/${{ env.NAME }}'
with:
name: "${{ env.NAME }}-docs"
path: doc.tar.gz
if-no-files-found: error
# TODO(#10): Enable this after open-sourcing
# - name: Push docs
# uses: peaceiris/actions-gh-pages@v3
# if: ${{ github.ref == 'refs/heads/main' }}
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: doc/book
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
cabal: ["3.10.1.0"]
ghc: ["9.2.8", "9.4.8", "9.6.3"]
name: GHC ${{ matrix.ghc }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Setup Haskell
uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- run: cp cabal.project.dist cabal.project
- name: Configure the build
# generates dist-newstyle/cache/plan.json for the cache key
run: cabal build --dry-run
- name: Restore cached dependencies
uses: actions/cache/restore@v3
id: cache
env:
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ env.key }}-
- shell: bash
name: Install system dependencies
run: .github/ci.sh install_system_deps
env:
BIN_ZIP_FILE: ${{ matrix.os }}-bin.zip
BUILD_TARGET_OS: ${{ matrix.os }}
BUILD_TARGET_ARCH: ${{ runner.arch }}
- name: Configure
run: cabal configure -j2 --enable-tests
- name: Build
run: cabal build
- name: Run parser tests
run: cabal test parser-tests
- name: Run translator tests
run: cabal test translator-tests
- name: Run stubs tests
run: cabal test stubs-tests
- name: Cache dependencies
uses: actions/cache/save@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache.outputs.cache-primary-key }}