-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
397 additions
and
135 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,74 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
. .github/scripts/common.sh | ||
|
||
run() { | ||
"$@" | ||
} | ||
|
||
if [ "${OS}" = "Windows" ] ; then | ||
GHCUP_DIR="${GHCUP_INSTALL_BASE_PREFIX}"/ghcup | ||
else | ||
GHCUP_DIR="${GHCUP_INSTALL_BASE_PREFIX}"/.ghcup | ||
fi | ||
|
||
git_describe | ||
|
||
rm -rf "${GHCUP_DIR}" | ||
mkdir -p "${GHCUP_BIN}" | ||
|
||
cp "out/${ARTIFACT}"-* "$GHCUP_BIN/ghcup${ext}" | ||
cp "out/test-${ARTIFACT}"-* "ghcup-test${ext}" | ||
chmod +x "$GHCUP_BIN/ghcup${ext}" | ||
chmod +x "ghcup-test${ext}" | ||
|
||
"$GHCUP_BIN/ghcup${ext}" --version | ||
eghcup --version | ||
sha_sum "$GHCUP_BIN/ghcup${ext}" | ||
sha_sum "$(raw_eghcup --offline whereis ghcup)" | ||
|
||
|
||
### cross build | ||
|
||
eghcup --numeric-version | ||
|
||
eghcup install ghc "${GHC_VER}" | ||
eghcup set ghc "${GHC_VER}" | ||
eghcup install cabal "${CABAL_VER}" | ||
|
||
cabal --version | ||
|
||
eghcup debug-info | ||
|
||
ecabal update | ||
|
||
"${WRAPPER}" "$GHCUP_BIN/ghcup${ext}" -c -s "file://$CI_PROJECT_DIR/data/metadata/ghcup-${JSON_VERSION}.yaml" -v \ | ||
compile ghc \ | ||
$(if [ -n "${HADRIAN_FLAVOUR}" ] ; then printf "%s" "--flavour=${HADRIAN_FLAVOUR}" ; else true ; fi) \ | ||
-j "$(nproc)" \ | ||
-v "${GHC_TARGET_VERSION}" \ | ||
-b "${GHC_VER}" \ | ||
-x "${CROSS}" \ | ||
-- ${BUILD_CONF_ARGS} | ||
eghcup set ghc "${CROSS}-${GHC_TARGET_VERSION}" | ||
|
||
[ "$($(eghcup whereis ghc "${CROSS}-${GHC_TARGET_VERSION}") --numeric-version)" = "${GHC_TARGET_VERSION}" ] | ||
|
||
# test that doing fishy symlinks into GHCup dir doesn't cause weird stuff on 'ghcup nuke' | ||
mkdir no_nuke/ | ||
mkdir no_nuke/bar | ||
echo 'foo' > no_nuke/file | ||
echo 'bar' > no_nuke/bar/file | ||
ln -s "$CI_PROJECT_DIR"/no_nuke/ "${GHCUP_DIR}"/cache/no_nuke | ||
ln -s "$CI_PROJECT_DIR"/no_nuke/ "${GHCUP_DIR}"/logs/no_nuke | ||
|
||
# nuke | ||
eghcup nuke | ||
[ ! -e "${GHCUP_DIR}" ] | ||
|
||
# make sure nuke doesn't resolve symlinks | ||
[ -e "$CI_PROJECT_DIR"/no_nuke/file ] | ||
[ -e "$CI_PROJECT_DIR"/no_nuke/bar/file ] | ||
|
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,140 @@ | ||
name: Test cross bindists | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 2 * * *' | ||
|
||
env: | ||
CABAL_CACHE_DISABLE: ${{ vars.CABAL_CACHE_DISABLE }} | ||
CABAL_CACHE_NONFATAL: yes | ||
|
||
jobs: | ||
build: | ||
name: Build linux binary | ||
runs-on: ubuntu-latest | ||
env: | ||
CABAL_VER: 3.10.1.0 | ||
JSON_VERSION: "0.0.7" | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
S3_HOST: ${{ secrets.S3_HOST }} | ||
ARTIFACT: "x86_64-linux-ghcup" | ||
GHC_VER: 8.10.7 | ||
ARCH: 64 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: Run build | ||
uses: docker://hasufell/alpine-haskell:3.12 | ||
with: | ||
args: sh .github/scripts/build.sh | ||
env: | ||
ARTIFACT: ${{ env.ARTIFACT }} | ||
ARCH: ${{ env.ARCH }} | ||
GHC_VER: ${{ env.GHC_VER }} | ||
DISTRO: Alpine | ||
AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} | ||
AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} | ||
S3_HOST: ${{ env.S3_HOST }} | ||
|
||
- if: always() | ||
name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: artifacts | ||
path: | | ||
./out/* | ||
test-cross-linux: | ||
name: Test linux cross | ||
needs: "build" | ||
runs-on: [self-hosted, Linux, X64] | ||
container: | ||
image: registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10:8d0224e6b2a08157649651e69302380b2bd24e11 | ||
options: --user root | ||
env: | ||
CABAL_VER: 3.6.2.0 | ||
BUILD_CONF_ARGS: "--enable-unregisterised" | ||
HADRIAN_FLAVOUR: "" | ||
JSON_VERSION: "0.0.7" | ||
GHC_VER: 8.10.6 | ||
GHC_TARGET_VERSION: "8.10.7" | ||
ARCH: 64 | ||
DISTRO: Debian | ||
ARTIFACT: "x86_64-linux-ghcup" | ||
CROSS: "arm-linux-gnueabihf" | ||
WRAPPER: "run" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifacts | ||
path: ./out | ||
|
||
- name: Run test (64 bit linux) | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl gzip | ||
sudo apt-get install -y gcc-arm-linux-gnueabihf | ||
sudo dpkg --add-architecture armhf | ||
sudo apt-get update -y | ||
sudo apt-get install -y libncurses-dev:armhf | ||
sh .github/scripts/cross.sh | ||
test-cross-js: | ||
name: Test GHC JS cross | ||
needs: "build" | ||
runs-on: [self-hosted, Linux, X64] | ||
container: | ||
image: registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10:8d0224e6b2a08157649651e69302380b2bd24e11 | ||
options: --user root | ||
env: | ||
CABAL_VER: 3.6.2.0 | ||
BUILD_CONF_ARGS: "" | ||
HADRIAN_FLAVOUR: "default+native_bignum" | ||
JSON_VERSION: "0.0.7" | ||
GHC_VER: 9.6.2 | ||
GHC_TARGET_VERSION: "9.6.2" | ||
ARCH: 64 | ||
DISTRO: Debian | ||
ARTIFACT: "x86_64-linux-ghcup" | ||
CROSS: "javascript-unknown-ghcjs" | ||
WRAPPER: "emconfigure" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifacts | ||
path: ./out | ||
|
||
- name: Run test (64 bit linux) | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl gzip | ||
git clone https://github.com/emscripten-core/emsdk.git | ||
cd emsdk | ||
./emsdk install latest | ||
./emsdk activate latest | ||
. ./emsdk_env.sh | ||
cd .. | ||
bash .github/scripts/cross.sh | ||
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
Oops, something went wrong.