mirror of
https://github.com/ivabus/pantry
synced 2024-11-29 11:45:07 +03:00
85 lines
No EOL
2.3 KiB
YAML
85 lines
No EOL
2.3 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:
|
|
diff:
|
|
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"
|
|
done
|
|
if [ -n "$RESULT" ]; then
|
|
RESULT="$(echo $RESULT | jq -R -s -c 'split(" ")')"
|
|
else
|
|
RESULT='["zlib.net"]'
|
|
fi
|
|
echo "pkgs=$RESULT" >> $GITHUB_OUTPUT
|
|
|
|
build:
|
|
needs: diff
|
|
name: ci ${{ matrix.platform.name }} ${{matrix.pkg}}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
pkg: ${{ fromJSON(needs.diff.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 }}
|
|
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 }}
|
|
env:
|
|
PKGX_PANTRY_PATH: ${{ github.workspace }}
|
|
|
|
- uses: pkgxdev/brewkit/audit@v1
|
|
if: steps.build.outputs.pkgspec
|
|
env:
|
|
PKGX_PANTRY_PATH: ${{ github.workspace }}
|
|
|
|
- uses: pkgxdev/brewkit/test@v1
|
|
if: steps.build.outputs.pkgspec
|
|
env:
|
|
PKGX_PANTRY_PATH: ${{ github.workspace }} |