diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index d3014ad..0000000 --- a/.cirrus.yml +++ /dev/null @@ -1,28 +0,0 @@ -freebsd_instance: - image_family: freebsd-13-2 - -build_task: - name: build - env: - GHC_VER: 9.4.8 - CABAL_VER: 3.10.2.0 - ARTIFACT: "x86_64-portbld-freebsd-ghcup" - ARCH: 64 - RUNNER_OS: FreeBSD - DISTRO: na - GITHUB_WORKSPACE: ${CIRRUS_WORKING_DIR} - JSON_VERSION: "0.0.7" - CIRRUS_CLONE_SUBMODULES: true - AWS_ACCESS_KEY_ID: ENCRYPTED[6ed6287e2dd78ab5f84b22232c5245834ab042bd8ba443883aaf4b4d1ecc0481add1fdfad5ae6f6a8cfb418e6f19b2fc] - AWS_SECRET_ACCESS_KEY: ENCRYPTED[16f3cda2954c7cee99444e6788eb5997382aa4ce1477e7523fef2586077541f43b5c816156961fc6b4677259679875a7] - S3_HOST: ENCRYPTED[ce961780a33159f7d1d8046956b5ac6ebc3bfc8149428e5f538576cda51d9f3d0c35b79cdd1e325793639ff6e31f889d] - install_script: - - 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 - script: - - tzsetup Etc/GMT - - adjkerntz -a - - bash .github/scripts/build.sh - - bash .github/scripts/test.sh - binaries_artifacts: - path: "out/*" diff --git a/.github/scripts/env.sh b/.github/scripts/env.sh index 088b4c8..61fd3c6 100644 --- a/.github/scripts/env.sh +++ b/.github/scripts/env.sh @@ -9,6 +9,10 @@ fi export DEBIAN_FRONTEND=noninteractive export TZ=Asia/Singapore +if [ "${RUNNER_OS}" = "freebsd" ] ; then + export RUNNER_OS=FreeBSD +fi + export OS="$RUNNER_OS" export PATH="$HOME/.local/bin:$PATH" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5bb32e7..9402309 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -493,6 +493,41 @@ jobs: name: testfiles path: | ./test/ghcup-test/golden/unix/GHCupInfo*json + test-freebsd: + name: Test FreeBSD + needs: "build-freebsd" + runs-on: [self-hosted, FreeBSD, X64] + env: + CABAL_VER: 3.10.2.0 + MACOSX_DEPLOYMENT_TARGET: 10.13 + JSON_VERSION: "0.0.8" + ARTIFACT: "x86_64-portbld-freebsd-ghcup" + GHC_VER: 9.4.8 + ARCH: 64 + DISTRO: na + RUNNER_OS: FreeBSD + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + submodules: 'true' + + - uses: actions/download-artifact@v3 + with: + name: artifacts + path: ./out + + - name: Run test + run: | + bash .github/scripts/test.sh + + - if: failure() + name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: testfiles + path: | + ./test/ghcup-test/golden/unix/GHCupInfo*json hls: name: hls needs: build-linux @@ -526,7 +561,7 @@ jobs: release: name: release - needs: ["test-linux", "test-arm", "test-macwin", "hls"] + needs: ["test-linux", "test-arm", "test-macwin", "test-freebsd", "hls"] runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') steps: