Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ git_describe
download_cabal_cache "$HOME/.local/bin/cabal-cache"

# install toolchain (if necessary)
ghcup -v install ghc --set --force "$GHC_VER"
ghcup -v install cabal --force "$CABAL_VER"
ghc --version
cabal --version
GHC="ghc-${GHC_VER}"
if [ "${OS}" = "OpenBSD" ] ; then
GHC="ghc-$(ghc --numeric-version)"
else
ghcup -v install ghc --set --force "$GHC_VER"
ghcup -v install cabal --force "$CABAL_VER"
ghc --version
cabal --version
GHC="ghc-${GHC_VER}"
fi

# build
ecabal update
Expand All @@ -28,8 +32,12 @@ binary_opttest=$(cabal --project-file=cabal.project.release list-bin ghcup-optpa
ver=$("${binary}" --numeric-version)
strip_binary "${binary}"

# linking info
if [ "${OS}" = "macOS" ] ; then
otool -L "${binary}" | grep libyaml && { echo "undesired libyaml linking" ; exit 5 ; }
otool -L "${binary}"
otool -L "${binary}" | grep libyaml && { echo "undesired libyaml linking" ; exit 5 ; }
else
ldd "${binary}" || true
fi

cp "${binary}" "out/${ARTIFACT}-${ver}${ext}"
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ eghcup() {
}

sha_sum() {
if [ "${OS}" = "FreeBSD" ] ; then
if [ "${OS}" = "FreeBSD" ] || [ "${OS}" = "OpenBSD" ] ; then
sha256 "$@"
else
sha256sum "$@"
Expand Down
4 changes: 4 additions & 0 deletions .github/scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ if [ "${RUNNER_OS}" = "freebsd" ] ; then
export RUNNER_OS=FreeBSD
fi

if [ "${RUNNER_OS}" = "openbsd" ] ; then
export RUNNER_OS=OpenBSD
fi

export OS="$RUNNER_OS"
export PATH="$HOME/.local/bin:$PATH"

Expand Down
6 changes: 5 additions & 1 deletion .github/scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@ sha_sum "$(raw_eghcup --offline whereis ghcup)"
./"ghcup-test-optparse${ext}"
rm "ghcup-test${ext}" "ghcup-test-optparse${ext}"

if [ "${OS}" = "OpenBSD" ] ; then
exit 0
fi

### manual cli based testing

eghcup --numeric-version

# test PATH on windows wrt msys2
# https://github.com/haskell/ghcup-hs/pull/992/checks
if [ "${OS}" = "Windows" ] ; then
eghcup run -m -- sh -c 'echo $PATH' | sed 's/:/\n/' | grep '^/mingw64/bin$'
eghcup run -m -- sh -c 'echo $PATH' | sed 's/:/\n/' | grep '^/clang64/bin$'
fi

eghcup install ghc "${GHC_VER}"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
schedule:
- cron: '0 2 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
bootstrap:
name: bootstrap
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cabal.project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
schedule:
- cron: '0 2 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build binary
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/cross.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
schedule:
- cron: '0 2 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CABAL_CACHE_DISABLE: ${{ vars.CABAL_CACHE_DISABLE }}
CABAL_CACHE_NONFATAL: yes
Expand All @@ -21,13 +25,13 @@ jobs:
name: Build linux binary
runs-on: [self-hosted, Linux, X64, maerwald]
env:
CABAL_VER: 3.10.3.0
CABAL_VER: 3.14.2.0
JSON_VERSION: "0.0.8"
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
GHC_VER: 9.6.7
ARCH: 64
steps:
- name: Checkout code
Expand Down Expand Up @@ -61,15 +65,15 @@ jobs:
needs: "build"
runs-on: [self-hosted, Linux, X64]
container:
image: registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb12:a9297a370025101b479cfd4977f8f910814e03ab
image: registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb12:5df428b97c501f61f57587048d4bd15eba53e364
options: --user root
env:
CABAL_VER: 3.10.3.0
CABAL_VER: 3.14.2.0
BUILD_CONF_ARGS: "--enable-unregisterised"
HADRIAN_FLAVOUR: ""
JSON_VERSION: "0.0.8"
GHC_VER: 8.10.6
GHC_TARGET_VERSION: "8.10.7"
GHC_VER: 9.6.7
GHC_TARGET_VERSION: "9.6.7"
ARCH: 64
DISTRO: Debian
ARTIFACT: "x86_64-linux-ghcup"
Expand Down Expand Up @@ -108,15 +112,15 @@ jobs:
needs: "build"
runs-on: [self-hosted, Linux, X64]
container:
image: registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb12:a9297a370025101b479cfd4977f8f910814e03ab
image: registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb12:5df428b97c501f61f57587048d4bd15eba53e364
options: --user root
env:
CABAL_VER: 3.10.3.0
BUILD_CONF_ARGS: ""
HADRIAN_FLAVOUR: "default+native_bignum"
JSON_VERSION: "0.0.8"
GHC_VER: 9.6.2
GHC_TARGET_VERSION: "9.6.2"
GHC_VER: 9.6.7
GHC_TARGET_VERSION: "9.6.7"
ARCH: 64
DISTRO: Debian
ARTIFACT: "x86_64-linux-ghcup"
Expand All @@ -139,6 +143,7 @@ jobs:
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
git checkout 3.1.74
./emsdk install latest
./emsdk activate latest
. ./emsdk_env.sh
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
hlint:
name: hlint
Expand Down
Loading
Loading