Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 25 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,37 @@ jobs:
run: devbox run -- npm run build

linux:
runs-on: ubuntu-latest
container: alpine:3.18
needs: validate-code-formatting
strategy:
matrix:
include:
- runner: ubuntu-24.04
arch: x86_64
artifact: gren_linux
- runner: ubuntu-24.04-arm
Comment thread
blaix marked this conversation as resolved.
arch: aarch64
artifact: gren_linux_arm64

runs-on: ${{ matrix.runner }}

steps:
- uses: laverdet/alpine-arm64@v1
if: runner.arch == 'ARM64'

- name: Install deps
run: apk add alpine-sdk autoconf gcc gmp gmp-dev libffi libffi-dev llvm15 make musl-dev ncurses-dev ncurses-static tree wget zlib-dev zlib-static curl

- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install GHCup
run: curl https://downloads.haskell.org/~ghcup/0.1.50.2/x86_64-linux-ghcup-0.1.50.2 -o /usr/local/bin/ghcup && chmod a+x /usr/local/bin/ghcup
run: curl https://downloads.haskell.org/~ghcup/0.1.50.2/${{ matrix.arch }}-linux-ghcup-0.1.50.2 -o /usr/local/bin/ghcup && chmod a+x /usr/local/bin/ghcup

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

- name: Install Haskell
run: ghcup install ghc ${{ env.ghc }} --set && ghcup install cabal ${{ env.cabal }} --set
Expand All @@ -74,17 +87,17 @@ jobs:
sed -i '$ d' cabal.project.freeze

- name: Cache cabal store
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.local/state/cabal/store
key: deps-linux-${{ env.ghc }}-${{ hashFiles('cabal.project.freeze') }}
key: deps-linux-${{ matrix.arch }}-${{ env.ghc }}-${{ hashFiles('cabal.project.freeze') }}

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

- name: Build
run: cabal build
Expand All @@ -98,9 +111,9 @@ jobs:
- name: Strip
run: strip gren

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

Expand Down
Loading