-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #784 from avh4/release/test-lamdera-community
Configure MacOS ARM64 release builds
- Loading branch information
Showing
7 changed files
with
128 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Build release (lamdera-community) | ||
|
||
on: | ||
push: | ||
tags: '*' | ||
branches: 'release/*' | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build: | ||
- name: macOS-ARM64 | ||
runner: [ self-hosted, macOS, ARM64 ] | ||
archive-label: macOS-arm64 | ||
ghc: | ||
version: "9.2.5" | ||
build-platform: aarch64-apple-darwin | ||
|
||
name: release-${{ matrix.build.name }} | ||
runs-on: ${{ matrix.build.runner }} | ||
|
||
steps: | ||
- name: Configure environment | ||
run: | | ||
git config --global core.autocrlf false | ||
- uses: actions/checkout@v3 | ||
- name: Check platform | ||
run: | | ||
uname -m | ||
arch | ||
arch -arm64 uname -m | ||
file ~/runner-setups/elm-format/_work/_tool/ghcup/0.1.19.0/arm64/ghcup | ||
- name: Workaround for https://github.com/actions/checkout/issues/290 | ||
run: git fetch --tags --prune --unshallow --force | ||
- name: Setup Haskell | ||
id: setup-haskell | ||
run: | | ||
curl -o ghcup https://downloads.haskell.org/~ghcup/0.1.19.0/aarch64-apple-darwin-ghcup-0.1.19.0 | ||
chmod 0555 ./ghcup | ||
file ./ghcup | ||
export GHCUP_USE_XDG_DIRS=1 | ||
./ghcup list | ||
export GHCUP_SKIP_UPDATE_CHECK=1 | ||
./ghcup unset ghc || true | ||
./ghcup install ghc "${{ matrix.build.ghc.version }}" | ||
./ghcup set ghc "${{ matrix.build.ghc.version }}" | ||
./ghcup install cabal recommended | ||
./ghcup set cabal recommended | ||
echo "$HOME/.local/bin" >> "$GITHUB_PATH" | ||
export PATH="$HOME/.local/bin:$PATH" | ||
cabalStore="$GITHUB_WORKSPACE/_cabal-store" | ||
~/.local/bin/cabal --store-dir="$cabalStore" v2-configure | ||
echo "cabal-store=$cabalStore" >> "$GITHUB_OUTPUT" | ||
- name: Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/20592#note_436353 | ||
run: | | ||
echo "C_INCLUDE_PATH=$(xcrun --show-sdk-path)/usr/include/ffi" >> "$GITHUB_ENV" | ||
cat "$GITHUB_ENV" | ||
- name: Verify Haskell version | ||
run: | | ||
file "$(which cabal)" | ||
cabal --version | ||
ghc --version | ||
ghc --print-build-platform | ||
[[ $(ghc --numeric-version) == "${{ matrix.build.ghc.version }}" ]] | ||
[[ $(ghc --print-build-platform) == "${{ matrix.build.ghc.build-platform }}" ]] | ||
- uses: actions/cache@v3 | ||
name: Cache cabal-release-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('cabal.project.freeze') }} | ||
with: | ||
path: ${{ steps.setup-haskell.outputs.cabal-store }} | ||
key: cabal-release-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('cabal.project.freeze') }} | ||
- run: cabal v2-update | ||
- run: ./build.sh -- dist-dependencies | ||
- run: ./build.sh -- dist | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: elm-format-${{ github.sha }}-${{ matrix.build.archive-label }} | ||
path: dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,6 @@ in haskellPackages.shellFor { | |
niv | ||
nixfmt | ||
haskellPackages.haskell-language-server | ||
unzip | ||
]; | ||
} |