Skip to content

Commit

Permalink
Add a GitHub Actions workflow for ARM64
Browse files Browse the repository at this point in the history
This also updates release.hs to use a more recent resolver, since
otherwise we'll have trouble on ARM64 with conflicting LLVM
installations. Unlike #5552, I took the simple workaround here of
installing GHC 8.6.5 in addition to the more recent GHC needed by
release.hs.
  • Loading branch information
snoyberg committed May 31, 2021
1 parent d1eef3f commit 834d50e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/arm64-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: ARM64 Release

on:
pull_request:
push:
branches:
- master
- stable
- rc/**
tags:
- '**'
workflow_dispatch:

jobs:
arm64:
name: Unit tests
runs-on: [self-hosted, linux, ARM64]
steps:
- name: Clone project
uses: actions/checkout@v2
- shell: bash
run: |
set -ex
mkdir -p ~/.local/bin
stack upgrade || curl -sSL https://github.com/commercialhaskell/stack/releases/download/v2.7.1/stack-2.7.1-linux-aarch64.bin > ~/.local/bin/stack
chmod +x ~/.local/bin/stack
~/.local/bin/stack etc/scripts/release.hs build
- name: Upload bindist
uses: actions/upload-artifact@v2
with:
name: ${{ runner.os }}
path: _release/stack-*
14 changes: 11 additions & 3 deletions etc/scripts/release.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{- stack script
--resolver lts-14.27
--resolver lts-17.10
--install-ghc
--ghc-options -Wall
--package Cabal
Expand Down Expand Up @@ -36,6 +36,7 @@ import Distribution.Text
import Distribution.System
import Distribution.Package
import Distribution.PackageDescription hiding (options)
import Distribution.Utils.ShortText (fromShortText)
import Distribution.Verbosity
import System.Console.GetOpt
import System.Directory
Expand Down Expand Up @@ -152,6 +153,13 @@ rules global@Global{..} args = do
, " option to continue anyway. Output:\n"
, show dirty
]

-- Integration tests still depend on GHC 8.6.5
() <- cmd
[gProjectRoot </> releaseBinDir </> binaryName </> stackExeFileName]
["setup"]
["ghc-8.6.5"]

() <- cmd
[gProjectRoot </> releaseBinDir </> binaryName </> stackExeFileName]
(stackArgs global)
Expand Down Expand Up @@ -214,8 +222,8 @@ rules global@Global{..} args = do
(command_ [] "c:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Bin\\signtool.exe"
["sign"
,"/v"
,"/d", synopsis gStackPackageDescription
,"/du", homepage gStackPackageDescription
,"/d", fromShortText $ synopsis gStackPackageDescription
,"/du", fromShortText $ homepage gStackPackageDescription
,"/n", certName
,"/t", "http://timestamp.verisign.com/scripts/timestamp.dll"
,out])
Expand Down

0 comments on commit 834d50e

Please sign in to comment.