-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (68 loc) · 2.54 KB
/
darwin-bindist.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: ghc-wasm-darwin-bindist
on:
pull_request:
paths:
- .github/workflows/darwin-bindist.yml
workflow_dispatch:
schedule:
- cron: '0 6 * * 0'
jobs:
ghc-wasm-darwin-bindist:
name: ghc-wasm-${{ matrix.arch }}-darwin-bindist
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- arch: aarch64
os: macos-15
- arch: x86_64
os: macos-15-large
env:
MACOSX_DEPLOYMENT_TARGET: "13.0"
steps:
- name: setup-xcode
run: |
sudo xcode-select --switch /Applications/Xcode_16.1.app
- name: setup-brew-deps
run: |
brew install automake
- name: setup-haskell
uses: haskell-actions/setup@v2
- name: setup-cabal-deps
run: |
cabal install \
alex \
happy
- name: setup-ghc-wasm-meta
run: |
curl https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/raw/master/bootstrap.sh | PREFIX=${{ runner.temp }}/.ghc-wasm SKIP_GHC=1 sh
${{ runner.temp }}/.ghc-wasm/add_to_github_path.sh
- name: build-hadrian
working-directory: ${{ runner.temp }}
run: |
git clone --ref-format=reftable --depth=1 --recurse-submodules --shallow-submodules --jobs 32 https://gitlab.haskell.org/ghc/ghc.git
cd ghc
./hadrian/build --version
- name: configure-ghc
working-directory: ${{ runner.temp }}/ghc
run: |
./boot
./configure $CONFIGURE_ARGS
- name: build-ghc
working-directory: ${{ runner.temp }}/ghc
run: |
hadrian/build --no-color --no-progress --no-time --flavour=release+text_simdutf --docs=none -j binary-dist-dir test:all_deps _build/stage0/bin/wasm32-wasi-{haddock,hpc,runghc}
- name: build-bindist
working-directory: ${{ runner.temp }}/ghc
run: |
BINDIST_NAME=$(basename _build/bindist/*)
gtar --sort=name --mtime="@$(git log -1 --pretty=%ct)" --owner=0 --group=0 --numeric-owner --use-compress-program="zstd --ultra -22 --threads=0" -cf _build/bindist/$BINDIST_NAME.tar.zst -C _build/bindist $BINDIST_NAME
- name: upload-bindist
uses: actions/upload-artifact@v4
with:
name: ghc-wasm-${{ matrix.arch }}-darwin-bindist
path: ${{ runner.temp }}/ghc/_build/bindist/*.tar.zst
- name: test-ghc
working-directory: ${{ runner.temp }}/ghc
run: |
hadrian/build --no-color --no-progress --no-time --flavour=release+text_simdutf --docs=none -j test