Skip to content

Commit

Permalink
Revert to ghcup based build for mac.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinheghan committed Dec 17, 2024
1 parent 74886b7 commit 61a015f
Showing 1 changed file with 54 additions and 54 deletions.
108 changes: 54 additions & 54 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,60 +110,60 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Install devbox
uses: jetify-com/[email protected]
with:
enable-cache: true

- name: Update cabal registry
run: devbox run -- cabal update

- name: List exact cabal deps
run: |
devbox run -- cabal freeze --only-dependencies
sed -i '' -e '$ d' cabal.project.freeze
- name: Cache cabal store
uses: actions/cache@v4
with:
path: ~/.cabal/store
key: deps-${{ matrix.os }}-${{ hashFiles('devbox.lock', 'cabal.project.freeze') }}

- name: Cache build artifacts
uses: actions/cache@v4
with:
path: dist-newstyle
key: dist-${{ matrix.os }}-${{ github.sha }}
restore-keys: dist-${{ matrix.os }}-

- name: Cache node_modules
uses: actions/cache@v4
with:
path: node_modules
key: npm-${{ matrix.os }}-${{ hashFiles('devbox.lock', 'package-lock.json') }}

- name: Install npm dependencies
run: devbox run -- npm install

- name: Configure
run: devbox run -- cabal configure --enable-tests -O2

- name: Build
run: devbox run -- cabal build

- name: Tests
run: devbox run test

- name: Move binary
run: cp `devbox run -- cabal list-bin .` ./gren

- uses: actions/upload-artifact@v4
with:
name: gren-${{ matrix.os }}
path: gren
retention-days: 14
steps:
- uses: actions/checkout@v4

- name: Cache ghcup
uses: actions/cache@v4
with:
path: ~/.ghcup
key: ghcup-${{ matrix.os }}-${{ env.ghc }}

- id: setup-haskell
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ env.ghc }}
cabal-version: ${{ env.cabal }}

- name: List exact cabal deps
run: |
cabal freeze --only-dependencies
sed -i '' -e '$ d' cabal.project.freeze
- name: Cache cabal store
uses: actions/cache@v4
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: deps-${{ matrix.os }}-${{ env.ghc }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: deps-${{ matrix.os }}-${{ env.ghc }}-

- name: Cache build artifacts
uses: actions/cache@v4
with:
path: dist-newstyle
key: dist-${{ matrix.os }}-${{ env.ghc }}-${{ github.sha }}
restore-keys: dist-${{ matrix.os }}-${{ env.ghc }}-

- name: Configure
run: cabal configure --enable-tests -O2

- name: Build
run: cabal build

- name: Tests
run: cabal test

- name: Move binary
run: cp `cabal list-bin .` ./gren

- name: Strip
run: strip gren

- uses: actions/upload-artifact@v4
with:
name: gren-${{ matrix.os }}
path: gren
retention-days: 14

windows:
runs-on: windows-latest
Expand Down

0 comments on commit 61a015f

Please sign in to comment.