Skip to content

Commit

Permalink
Merge branch 'freebsd'
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Feb 2, 2024
2 parents d0538a5 + 2bfca37 commit 9b2d326
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 46 deletions.
28 changes: 0 additions & 28 deletions .cirrus.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cross.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
jobs:
build:
name: Build linux binary
runs-on: ubuntu-latest
runs-on: [self-hosted, Linux, X64, maerwald]
env:
CABAL_VER: 3.10.1.0
JSON_VERSION: "0.0.7"
Expand Down
93 changes: 76 additions & 17 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,15 @@ jobs:
fail-fast: true
matrix:
include:
- os: [self-hosted, Linux, ARM64]
- os: [self-hosted, Linux, ARM64, maerwald]
ARTIFACT: "armv7-linux-ghcup"
GHC_VER: 9.2.8
ARCH: ARM
- os: [self-hosted, Linux, ARM64]
- os: [self-hosted, Linux, ARM64, maerwald]
ARTIFACT: "aarch64-linux-ghcup"
GHC_VER: 9.4.8
ARCH: ARM64
steps:
- uses: docker://arm64v8/debian:10
name: Cleanup (aarch64 linux)
continue-on-error: true
with:
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"

- name: git config
run: |
git config --global --get-all safe.directory | grep '^\*$' || git config --global --add safe.directory "*"
Expand Down Expand Up @@ -247,6 +241,42 @@ jobs:
path: |
./out/*
build-freebsd:
name: Build binary (FreeBSD)
runs-on: [self-hosted, FreeBSD, X64]
env:
CABAL_VER: 3.10.2.0
MACOSX_DEPLOYMENT_TARGET: 10.13
JSON_VERSION: "0.0.8"
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
S3_HOST: ${{ secrets.S3_HOST }}
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'

- 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:
name: artifacts
path: |
./out/*
test-linux:
name: Test linux
needs: "build-linux"
Expand Down Expand Up @@ -335,24 +365,18 @@ jobs:
strategy:
matrix:
include:
- os: [self-hosted, Linux, ARM64]
- os: [self-hosted, Linux, ARM64, maerwald]
ARTIFACT: "armv7-linux-ghcup"
GHC_VER: 9.2.8
ARCH: ARM
DISTRO: Ubuntu
- os: [self-hosted, Linux, ARM64]
- os: [self-hosted, Linux, ARM64, maerwald]
ARTIFACT: "aarch64-linux-ghcup"
GHC_VER: 9.4.8
ARCH: ARM64
DISTRO: Ubuntu

steps:
- uses: docker://arm64v8/debian:10
name: Cleanup (aarch64 linux)
continue-on-error: true
with:
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"

- name: Checkout code
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -469,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
Expand Down Expand Up @@ -502,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:
Expand Down

0 comments on commit 9b2d326

Please sign in to comment.