Skip to content

Commit 0ed0328

Browse files
committed
Add FreeBSD
1 parent 6aade43 commit 0ed0328

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

.github/scripts/env.sh

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ export BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=no
1717
export BOOTSTRAP_HASKELL_INSTALL_NO_STACK=yes
1818
export BOOTSTRAP_HASKELL_ADJUST_BASHRC=1
1919

20+
if [ "${RUNNER_OS}" = "freebsd" ] ; then
21+
export RUNNER_OS=FreeBSD
22+
fi
23+
2024
if [ "${RUNNER_OS}" = "Windows" ] ; then
2125
# on windows use pwd to get unix style path
2226
CI_PROJECT_DIR="$(pwd)"

.github/workflows/release.yaml

+34-1
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,42 @@ jobs:
366366
path: |
367367
./out/*
368368
369+
build-freebsd-x86_64:
370+
name: Build FreeBSD x86_64
371+
runs-on: [self-hosted, FreeBSD, X64]
372+
env:
373+
ADD_CABAL_ARGS: ""
374+
ARTIFACT: "x86_64-portbld-freebsd"
375+
ARCH: 64
376+
TARBALL_EXT: tar.xz
377+
DISTRO: na
378+
GHC_VERSION: 9.2.8
379+
RUNNER_OS: FreeBSD
380+
steps:
381+
- name: Checkout code
382+
uses: actions/checkout@v3
383+
384+
- name: Run build
385+
run: |
386+
sed -i.bak -e 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
387+
pkg install -y ghc hs-cabal-install git bash misc/compat10x misc/compat11x misc/compat12x gmake llvm14 libiconv
388+
tzsetup Etc/GMT
389+
adjkerntz -a
390+
bash .github/scripts/build.sh
391+
392+
- if: always()
393+
name: Upload artifact
394+
uses: actions/upload-artifact@v3
395+
with:
396+
if-no-files-found: error
397+
retention-days: 2
398+
name: artifacts
399+
path: |
400+
./out/*
401+
369402
release:
370403
name: release
371-
needs: ["build-linux", "build-linux-32bit", "build-arm", "build-mac-x86_64", "build-mac-aarch64", "build-win"]
404+
needs: ["build-linux", "build-linux-32bit", "build-arm", "build-mac-x86_64", "build-mac-aarch64", "build-win", "build-freebsd-x86_64"]
372405
runs-on: ubuntu-latest
373406
if: startsWith(github.ref, 'refs/tags/')
374407
steps:

0 commit comments

Comments
 (0)