Skip to content

Commit

Permalink
run action and cache
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWhiting committed Jun 23, 2024
1 parent 1a2f824 commit 927d0fe
Showing 1 changed file with 13 additions and 37 deletions.
50 changes: 13 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ on:
permissions:
contents: write

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

name: build
jobs:
build:
name: Build Koka
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] #, macOS-latest]
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -24,37 +27,17 @@ jobs:
test: false
stack-build-arguments: ""
cache-save-always: true
# - uses: haskell-actions/setup@v2
# with:
# enable-stack: true
# stack-version: 'latest'
# - run: |
# stack config set system-ghc --global false
# stack config set install-ghc --global true

# - 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: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Run Koka Packaging
run: |
stack exec koka -- -e -O2 util/bundle
Expand All @@ -64,11 +47,4 @@ jobs:
with:
files: |
bundle/**/*.tar.gz
make_latest: true

# - 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 927d0fe

Please sign in to comment.