From 516c650589b467de9f0559835f88e3d13413e821 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 16 Sep 2024 02:35:17 +0200 Subject: [PATCH] CI: add FreeBSD build --- .github/workflows/non_native.yml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/non_native.yml diff --git a/.github/workflows/non_native.yml b/.github/workflows/non_native.yml new file mode 100644 index 0000000000..f6e664921c --- /dev/null +++ b/.github/workflows/non_native.yml @@ -0,0 +1,42 @@ +name: Non-native builds + +on: + push: + paths-ignore: + - 'docs/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +permissions: + contents: read + + +jobs: + freebsd: + name: 'FreeBSD (${{ matrix.compiler }}, ${{ matrix.arch }})' + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + matrix: + include: + - { arch: 'x86_64', compiler: 'clang' } + - { arch: 'arm64', compiler: 'clang' } + fail-fast: false + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + + - uses: cross-platform-actions/action@cdc9ee69ef84a5f2e59c9058335d9c57bcb4ac86 # v0.25.0 + with: + operating_system: 'freebsd' + version: '14.1' + architecture: ${{ matrix.arch }} + run: | + # https://ports.freebsd.org/ + sudo pkg install -y cmake ninja pkgconf tiff curl sqlite3 + cmake -B bld -G Ninja \ + '-DCMAKE_C_COMPILER=${{ matrix.compiler }}' \ + -DCMAKE_UNITY_BUILD=ON \ + cmake --build bld + ctest --build bld