Skip to content

Commit

Permalink
Add FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Mar 19, 2024
1 parent 6aade43 commit 0ed0328
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=no
export BOOTSTRAP_HASKELL_INSTALL_NO_STACK=yes
export BOOTSTRAP_HASKELL_ADJUST_BASHRC=1

if [ "${RUNNER_OS}" = "freebsd" ] ; then
export RUNNER_OS=FreeBSD
fi

if [ "${RUNNER_OS}" = "Windows" ] ; then
# on windows use pwd to get unix style path
CI_PROJECT_DIR="$(pwd)"
Expand Down
35 changes: 34 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,42 @@ jobs:
path: |
./out/*
build-freebsd-x86_64:
name: Build FreeBSD x86_64
runs-on: [self-hosted, FreeBSD, X64]
env:
ADD_CABAL_ARGS: ""
ARTIFACT: "x86_64-portbld-freebsd"
ARCH: 64
TARBALL_EXT: tar.xz
DISTRO: na
GHC_VERSION: 9.2.8
RUNNER_OS: FreeBSD
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run build
run: |
sed -i.bak -e 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
pkg install -y ghc hs-cabal-install git bash misc/compat10x misc/compat11x misc/compat12x gmake llvm14 libiconv
tzsetup Etc/GMT
adjkerntz -a
bash .github/scripts/build.sh
- if: always()
name: Upload artifact
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
retention-days: 2
name: artifacts
path: |
./out/*
release:
name: release
needs: ["build-linux", "build-linux-32bit", "build-arm", "build-mac-x86_64", "build-mac-aarch64", "build-win"]
needs: ["build-linux", "build-linux-32bit", "build-arm", "build-mac-x86_64", "build-mac-aarch64", "build-win", "build-freebsd-x86_64"]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
Expand Down

0 comments on commit 0ed0328

Please sign in to comment.