From 0ed0328ead278cef9117b9124ef9dea8e2037f85 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 19 Mar 2024 22:56:57 +0800 Subject: [PATCH] Add FreeBSD --- .github/scripts/env.sh | 4 ++++ .github/workflows/release.yaml | 35 +++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.github/scripts/env.sh b/.github/scripts/env.sh index 7c163766d3c..ec351f75f86 100644 --- a/.github/scripts/env.sh +++ b/.github/scripts/env.sh @@ -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)" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a7f559a0b1a..35f43b2680e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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: