Skip to content

Commit 96a429e

Browse files
committed
ci: enable M1 runners for CI job
1 parent e03efba commit 96a429e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
env:
1212
# Tag for cache invalidation
13-
CACHE_VERSION: v6
13+
CACHE_VERSION: v1
1414

1515
jobs:
1616
build:
@@ -25,6 +25,8 @@ jobs:
2525
container: "{\"image\": \"elopeztob/alpine-haskell-stack-echidna:ghc-9.4.7\", \"options\": \"--user 1001\"}"
2626
- os: macos-latest
2727
shell: bash
28+
- os: macos-latest-xlarge
29+
shell: bash
2830
- os: windows-latest
2931
shell: msys2 {0}
3032

@@ -35,7 +37,7 @@ jobs:
3537
steps:
3638
- name: Get Packages (macOS)
3739
if: runner.os == 'macOS'
38-
run: brew install automake
40+
run: brew install autoconf automake libtool
3941

4042
- name: Get Packages (Windows)
4143
uses: msys2/setup-msys2@v2
@@ -76,10 +78,12 @@ jobs:
7678
{ echo "extra-include-dirs:";
7779
echo "- $HOME/.local/include";
7880
echo "$EXTRA_INCLUDE_WIN";
81+
echo "$EXTRA_INCLUDE_MAC_AARCH64";
7982
echo;
8083
echo "extra-lib-dirs:";
8184
echo "- $HOME/.local/lib";
8285
echo "$EXTRA_LIB_WIN";
86+
echo "$EXTRA_LIB_MAC_AARCH64";
8387
echo;
8488
echo "ghc-options:";
8589
echo -n ' "$locals": -Werror'
@@ -93,6 +97,8 @@ jobs:
9397
EXTRA_INCLUDE_WIN: ${{ (runner.os == 'Windows' && '- C:/msys64/clang64/include') || '' }}
9498
EXTRA_LIB_WIN: ${{ (runner.os == 'Windows' && '- C:/msys64/clang64/lib') || '' }}
9599
REPLACE_LINKER_WIN: ${{ (runner.os == 'Windows' && 'true') || 'false' }}
100+
EXTRA_INCLUDE_MAC_AARCH64: ${{ (runner.os == 'macOS' && runner.arch == 'ARM64' && '- /opt/homebrew/include') || '' }}
101+
EXTRA_LIB_MAC_AARCH64: ${{ (runner.os == 'macOS' && runner.arch == 'ARM64' && '- /opt/homebrew/lib') || '' }}
96102
SKIP_MSYS: ${{ (runner.os == 'Windows' && 'true') || 'false' }}
97103

98104
- name: Configure Haskell paths (Windows)
@@ -114,7 +120,7 @@ jobs:
114120
path: |
115121
~/.local
116122
C:\msys64\home\runneradmin\.local
117-
key: ${{ runner.os }}-local-${{ env.CACHE_VERSION }}-${{ hashFiles('.github/scripts/install-*') }}
123+
key: ${{ runner.os }}-${{ runner.arch }}-local-${{ env.CACHE_VERSION }}-${{ hashFiles('.github/scripts/install-*') }}
118124

119125
- name: Cache Stack & Cabal
120126
uses: actions/cache@v3
@@ -126,7 +132,7 @@ jobs:
126132
!${{ steps.stack.outputs.stack-root || '~/.stack' }}/pantry/hackage/*.tar
127133
!${{ steps.stack.outputs.stack-root || '~/.stack' }}/pantry/hackage/*.tar.gz
128134
!${{ steps.stack.outputs.stack-root || '~/.stack' }}/config.yaml
129-
key: ${{ runner.os }}-stack-${{ env.CACHE_VERSION }}-${{ hashFiles('package.yaml', 'stack.yaml') }}
135+
key: ${{ runner.os }}-${{ runner.arch }}-stack-${{ env.CACHE_VERSION }}-${{ hashFiles('package.yaml', 'stack.yaml') }}
130136

131137
- name: Build Libraries
132138
run: |
@@ -160,7 +166,7 @@ jobs:
160166
- name: Upload artifact
161167
uses: actions/upload-artifact@v3
162168
with:
163-
name: echidna-${{ runner.os }}
169+
name: echidna-${{ runner.os }}-${{ runner.arch }}
164170
path: echidna.tar.gz
165171

166172
- name: Build and copy test suite

0 commit comments

Comments
 (0)