pantry/.github/workflows/ci.yml
Jacob Heider 1614e01c30
fix(zlib) (#4452)
* fix(zlib)

boost complaining about -fPIC:

https://github.com/pkgxdev/pantry/actions/runs/7226847979/job/19693299131

* don't include newlines
2023-12-15 17:05:44 -05:00

83 lines
2.2 KiB
YAML

name: ci
run-name: "ci: ${{ github.event.pull_request.title }}"
on:
pull_request:
paths:
- projects/**/*
- .github/workflows/ci.yml
concurrency:
group: ci/${{ github.event.pull_request.head.ref }}
cancel-in-progress: true
jobs:
plan:
runs-on: ubuntu-latest
outputs:
pkgs: ${{ steps.diff.outputs.pkgs }}
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
id: get-diff
with:
PATTERNS: projects/**/package.yml
- id: diff
run: |
for x in ${{ steps.get-diff.outputs.diff }}; do
y=$(echo $x | sed 's#projects/\(.*\)/[^/]*#\1#')
RESULT="$RESULT ${y//$'\n'/}"
done
if [ -n "$RESULT" ]; then
RESULT="$(echo -n $RESULT | jq -R -s -c 'split(" ")')"
else
RESULT='["zlib.net"]'
fi
echo "pkgs=$RESULT" >> $GITHUB_OUTPUT
build:
if: needs.plan.outputs.pkgs
needs: plan
name: ci ${{ matrix.platform.name }} ${{matrix.pkg}}
strategy:
fail-fast: false
matrix:
pkg: ${{ fromJSON(needs.plan.outputs.pkgs) }}
platform:
- os: ["self-hosted", "macOS", "X64"]
name: x64
- os: ["self-hosted", "macOS", "ARM64"]
name: ²
- os: ["self-hosted", "linux", "ARM64"]
name: Lnx·ARM64
- os: { group: "linux-x86-64" }
container: debian:buster-slim
name: Lnx·x64
runs-on: ${{ matrix.platform.os }}
container: ${{ matrix.platform.container }}
env:
PKGX_PANTRY_PATH: ${{ github.workspace }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE_P12 }}
p12-password: ${{ secrets.APPLE_CERTIFICATE_P12_PASSWORD }}
APPLE_IDENTITY: ${{ secrets.APPLE_IDENTITY }}
- uses: pkgxdev/setup@v2
with:
PKGX_DIR: /opt
- uses: pkgxdev/brewkit/build@v1
id: build
with:
pkg: ${{ matrix.pkg }}
- uses: pkgxdev/brewkit/audit@v1
if: steps.build.outputs.pkgspec
- uses: pkgxdev/brewkit/test@v1
if: steps.build.outputs.pkgspec