Skip to content

Commit

Permalink
try building
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWhiting committed Jun 23, 2024
1 parent 9f400dd commit f22332f
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
on:
push:
branches: [main]
tags:
- 'v*'

name: build
jobs:
build:
name: Build Koka
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] #, macOS-latest]
steps:
- uses: actions/checkout@v4

- uses: haskell-actions/setup@v2
with:
enable-stack: true
stack-version: 'latest'
- run: |
stack config set system-ghc --global true
stack config set install-ghc --global false
- name: List dependencies
run: stack ls dependencies json | jq > stack-deps.json

- name: Restore cached dependency of Pantry (Stackage package index)
uses: actions/cache/restore@v4
id: pantry
env:
key: ghc-${{ steps.setup.outputs.ghc-version }}-stack-${{ steps.setup.outputs.stack-version }}
with:
path: ${{ steps.setup.outputs.stack-root }}/pantry
key: all-plan-${{ hashFiles('stack-deps.json') }}
restore-keys: all

- name: Recompute Stackage package index (~/.stack/pantry)
if: steps.pantry.outputs.cache-hit != 'true'
run: stack update

- name: Stack lock check
run: stack build --dry-run --lock-file=error-on-write

- name: Build
run: stack build

- name: Run Koka Packaging
run: |
stack exec koka -- -e -O2 util/bundle
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
bundle/*.tar.gz
- name: Save cached dependencies of Pantry
uses: actions/cache/save@v4
if: steps.pantry.outputs.cache-hit != 'true'
with:
path: ${{ steps.setup.outputs.stack-root }}/pantry
key: ${{ steps.pantry.outputs.cache-primary-key }}
make_latest: true

0 comments on commit f22332f

Please sign in to comment.