Add Fallback
to LogEntry
(#3657)
#698
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: "Release" | |
on: | |
push: | |
branches: | |
- master | |
env: | |
ghc_version: "9.2.8" | |
stack_version: "2.9.3" | |
jobs: | |
release: | |
name: 'Release' | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Nix | |
uses: cachix/install-nix-action@v22 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.13.3/install | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
substituters = http://cache.nixos.org https://cache.iog.io | |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= | |
- name: Install Cachix | |
uses: cachix/cachix-action@v12 | |
with: | |
name: k-framework | |
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}' | |
- name: Build | |
run: nix-build -A project.x86_64-linux.kore -A project.x86_64-linux.kore.checks | |
cache-cabal: | |
name: 'Cache Cabal' | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install prerequisites | |
run: | | |
sudo apt install --yes z3 | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Cache Cabal package database and store | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cabal/packages | |
~/.cabal/store | |
key: cabal-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('kore/kore.cabal') }}-${{ hashFiles('kore-rpc-types/kore-rpc-types.cabal') }} | |
restore-keys: | | |
cabal-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('kore/kore.cabal') }} | |
cabal-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }} | |
cabal-2-${{ runner.os }}-ghc-${{ env.ghc_version }} | |
- uses: haskell/actions/setup@v2 | |
id: setup-haskell-cabal | |
with: | |
ghc-version: ${{ env.ghc_version }} | |
cabal-version: "3.6" | |
- name: Build | |
run: cabal v2-build --enable-tests --enable-benchmarks all | |
cache-stack: | |
name: 'Cache Stack' | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install prerequisites | |
run: | | |
sudo apt install --yes z3 | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Cache Stack root | |
uses: actions/cache@v3 | |
with: | |
path: ~/.stack | |
key: stack-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('stack.yaml.lock') }} | |
restore-keys: | | |
stack-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('stack.yaml') }} | |
stack-2-${{ runner.os }}-ghc-${{ env.ghc_version }} | |
- uses: haskell/actions/setup@v2 | |
id: setup-haskell-stack | |
with: | |
ghc-version: ${{ env.ghc_version }} | |
stack-version: ${{ env.stack_version }} | |
enable-stack: true | |
stack-setup-ghc: true | |
- name: Build dependencies | |
run: | | |
stack build --test | |
cache-stack-haddock: | |
name: 'Cache Stack Haddock' | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install prerequisites | |
run: | | |
sudo apt install --yes z3 | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Cache Stack root | |
uses: actions/cache@v3 | |
with: | |
path: ~/.stack | |
key: stack-haddock-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('stack.yaml.lock') }} | |
restore-keys: | | |
stack-haddock-2-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('stack.yaml') }} | |
stack-haddock-2-${{ runner.os }}-ghc-${{ env.ghc_version }} | |
- uses: haskell/actions/setup@v2 | |
id: setup-haskell-stack | |
with: | |
ghc-version: ${{ env.ghc_version }} | |
stack-version: ${{ env.stack_version }} | |
enable-stack: true | |
stack-setup-ghc: true | |
- name: Check documentation | |
run: | | |
stack haddock --fast | |
update-dependents: | |
name: 'Publish Release' | |
runs-on: ubuntu-latest | |
environment: production | |
needs: [release, cache-cabal, cache-stack, cache-stack-haddock] | |
steps: | |
- name: 'Update dependents' | |
env: | |
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }} | |
run: | | |
set -x | |
version="${GITHUB_SHA}" | |
curl --fail \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${GITHUB_TOKEN}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/runtimeverification/devops/dispatches \ | |
-d '{"event_type":"on-demand-test","client_payload":{"repo":"runtimeverification/haskell-backend","version":"'${version}'"}}' |