Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use self-hosted FreeBSD runners #313

Merged
merged 1 commit into from
Mar 22, 2024
Merged
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
18 changes: 9 additions & 9 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
task:
name: FreeBSD
freebsd_instance:
image_family: freebsd-13-2
install_script: pkg install -y ghc hs-cabal-install git autoconf
script:
- cabal update
- autoreconf -i
- cabal test --test-show-details=direct
# task:
# name: FreeBSD
# freebsd_instance:
# image_family: freebsd-13-2
# install_script: pkg install -y ghc hs-cabal-install git autoconf
# script:
# - cabal update
# - autoreconf -i
# - cabal test --test-show-details=direct

task:
name: OpenBSD
Expand Down
31 changes: 31 additions & 0 deletions .github/scripts/env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

if [ "${RUNNER_OS}" = "Windows" ] ; then
ext=".exe"
else
ext=''
fi

export DEBIAN_FRONTEND=noninteractive
export TZ=Asia/Singapore

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

if [ "${RUNNER_OS}" = "Windows" ] ; then
# on windows use pwd to get unix style path
CI_PROJECT_DIR="$(pwd)"
export CI_PROJECT_DIR
export GHCUP_INSTALL_BASE_PREFIX="/c"
export GHCUP_BIN="$GHCUP_INSTALL_BASE_PREFIX/ghcup/bin"
export PATH="$GHCUP_BIN:$PATH"
export CABAL_DIR="C:\\Users\\runneradmin\\AppData\\Roaming\\cabal"
else
export CI_PROJECT_DIR="${GITHUB_WORKSPACE}"
export GHCUP_INSTALL_BASE_PREFIX="$CI_PROJECT_DIR"
export GHCUP_BIN="$GHCUP_INSTALL_BASE_PREFIX/.ghcup/bin"
export PATH="$GHCUP_BIN:$PATH"
export CABAL_DIR="$CI_PROJECT_DIR/cabal"
export CABAL_CACHE="$CI_PROJECT_DIR/cabal-cache"
fi

27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,30 @@ jobs:
name: Run build (arm64v8 linux)
with:
args: sh -c "cabal update && autoreconf -i && cabal test all --test-show-details=direct"

freebsd:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: [self-hosted, FreeBSD, X64]
ghc: 9.4.8
- os: [self-hosted, FreeBSD, X64]
ghc: 9.6.4
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run build
run: |
pkg install -y curl gcc gmp gmake ncurses perl5 libffi libiconv git bash misc/compat10x misc/compat11x misc/compat12x gmake autoconf
. .github/scripts/env.sh
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 BOOTSTRAP_HASKELL_GHC_VERSION=${{ matrix.ghc }} BOOTSTRAP_HASKELL_ADJUST_BASHRC=yes sh
autoreconf --version
autoreconf -i
cabal sdist -z -o .
cabal get unix-*.tar.gz
cd unix-*/
cabal test all --test-show-details=direct

Loading