2022-10-31 21:00:24 +03:00
|
|
|
name: ci
|
2023-10-07 00:33:50 +03:00
|
|
|
run-name: "ci: ${{ github.event.pull_request.title }}"
|
2023-03-14 23:41:37 +03:00
|
|
|
|
2023-10-31 22:16:49 +03:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- projects/**/*
|
|
|
|
- .github/workflows/ci.yml
|
2022-10-31 21:00:24 +03:00
|
|
|
|
2023-10-07 00:33:50 +03:00
|
|
|
concurrency:
|
2023-12-13 13:42:25 +03:00
|
|
|
group: ci/${{ github.event.pull_request.head.ref }}
|
2023-10-07 00:33:50 +03:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-10-31 21:00:24 +03:00
|
|
|
jobs:
|
2023-12-13 13:42:25 +03:00
|
|
|
diff:
|
2022-10-31 21:00:24 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
2023-12-13 13:42:25 +03:00
|
|
|
pkgs: ${{ steps.diff.outputs.pkgs }}
|
2022-10-31 21:00:24 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: technote-space/get-diff-action@v6
|
2023-02-11 14:06:35 +03:00
|
|
|
id: get-diff
|
2022-10-31 21:00:24 +03:00
|
|
|
with:
|
|
|
|
PATTERNS: projects/**/package.yml
|
2023-02-11 14:06:35 +03:00
|
|
|
- id: diff
|
|
|
|
run: |
|
2022-12-31 17:50:18 +03:00
|
|
|
for x in ${{ steps.get-diff.outputs.diff }}; do
|
2023-12-13 13:42:25 +03:00
|
|
|
y=$(echo $x | sed 's#projects/\(.*\)/[^/]*#\1#')
|
2022-12-31 17:50:18 +03:00
|
|
|
RESULT="$RESULT $y"
|
|
|
|
done
|
2023-12-13 13:42:25 +03:00
|
|
|
if [ -n "$RESULT" ]; then
|
|
|
|
RESULT="$(echo $RESULT | jq -R -s -c 'split(" ")')"
|
|
|
|
else
|
|
|
|
RESULT='["zlib.net"]'
|
|
|
|
fi
|
|
|
|
echo "pkgs=$RESULT" >> $GITHUB_OUTPUT
|
|
|
|
|
2023-04-09 15:26:48 +03:00
|
|
|
build:
|
2023-12-13 13:42:25 +03:00
|
|
|
needs: diff
|
|
|
|
name: ci ${{ matrix.platform.name }} ${{matrix.pkg}}
|
2023-02-04 03:52:04 +03:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-12-13 13:42:25 +03:00
|
|
|
pkg: ${{ fromJSON(needs.diff.outputs.pkgs) }}
|
2023-02-04 03:52:04 +03:00
|
|
|
platform:
|
2023-12-13 13:42:25 +03:00
|
|
|
- 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 }}
|