Skip to content

Prepare 0.7.1 release #10

Prepare 0.7.1 release

Prepare 0.7.1 release #10

Workflow file for this run

# Do not modify!
# This file was generated from a template using https://github.com/StefMa/pkl-gha
name: Pull Request
'on':
pull_request: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test-pkl-0-25-3:
name: Test Pkl 0.25.3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Pkl
id: setup-pkl
env:
PKL_VERSION: 0.25.3
PKL_FILENAME: pkl
PKL_DOWNLOAD_URL: https://github.com/apple/pkl/releases/download/0.25.3/pkl-linux-amd64
shell: bash
run: |-
DIR="$(mktemp -d /tmp/pkl-$PKL_VERSION-XXXXXX)"
PKL_EXEC="$DIR/$PKL_FILENAME"
curl -sfL -o $PKL_EXEC "$PKL_DOWNLOAD_URL"
chmod +x $PKL_EXEC
echo "$DIR" >> "$GITHUB_PATH"
echo "pkl_exec=$PKL_EXEC" >> "$GITHUB_OUTPUT"
- name: swift test
run: |-
mkdir -p .out/test-results/
swift test -vv --parallel --num-workers 1 --xunit-output .out/test-results/xunit.xml -Xswiftc -warnings-as-errors
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@v5
with:
name: test-results-xml-test-pkl-0-25-3
path: .out/test-results/**/*.xml
if-no-files-found: ignore
container:
image: swift:6.1-rhel-ubi9
test-pkl-0-30-0:
name: Test Pkl 0.30.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Pkl
id: setup-pkl
env:
PKL_VERSION: 0.30.0
PKL_FILENAME: pkl
PKL_DOWNLOAD_URL: https://github.com/apple/pkl/releases/download/0.30.0/pkl-linux-amd64
shell: bash
run: |-
DIR="$(mktemp -d /tmp/pkl-$PKL_VERSION-XXXXXX)"
PKL_EXEC="$DIR/$PKL_FILENAME"
curl -sfL -o $PKL_EXEC "$PKL_DOWNLOAD_URL"
chmod +x $PKL_EXEC
echo "$DIR" >> "$GITHUB_PATH"
echo "pkl_exec=$PKL_EXEC" >> "$GITHUB_OUTPUT"
- name: swift test
run: |-
mkdir -p .out/test-results/
swift test -vv --parallel --num-workers 1 --xunit-output .out/test-results/xunit.xml -Xswiftc -warnings-as-errors
- run: git config --global --add safe.directory $(pwd)
- run: make test-snippets
- run: make test-pkl
- run: make generate-fixtures
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@v5
with:
name: test-results-xml-test-pkl-0-30-0
path: .out/test-results/**/*.xml
if-no-files-found: ignore
container:
image: swift:6.1-rhel-ubi9
test-sim-ios-simulator:
if: github.repository_owner == 'apple'
runs-on:
- self-hosted
- macos
env:
XCODE_VERSION: '26.1'
DEVELOPER_DIR: /Applications/Xcode_26.1.app
steps:
- uses: actions/checkout@v5
- run: brew install gmp libyaml
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
- run: gem install xcpretty
- name: xcodebuild test
env:
LC_CTYPE: en_US.UTF-8
run: |-
xcodebuild -scheme pkl-swift-Package -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 17' ONLY_ACTIVE_ARCH=YES CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=YES COMPILER_INDEX_STORE_ENABLE=NO test \
| xcpretty --report junit --output .out/test-results/test-sim-ios-simulator.xml
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@v5
with:
name: test-results-xml-test-sim-ios-simulator
path: .out/test-results/**/*.xml
if-no-files-found: ignore
test-sim-watchos-simulator:
if: github.repository_owner == 'apple'
runs-on:
- self-hosted
- macos
env:
XCODE_VERSION: '26.1'
DEVELOPER_DIR: /Applications/Xcode_26.1.app
steps:
- uses: actions/checkout@v5
- run: brew install gmp libyaml
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
- run: gem install xcpretty
- name: xcodebuild test
env:
LC_CTYPE: en_US.UTF-8
run: |-
xcodebuild -scheme pkl-swift-Package -sdk watchsimulator -destination 'platform=watchOS Simulator,name=Apple Watch Series 11 (42mm)' ONLY_ACTIVE_ARCH=YES CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=YES COMPILER_INDEX_STORE_ENABLE=NO test \
| xcpretty --report junit --output .out/test-results/test-sim-watchos-simulator.xml
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@v5
with:
name: test-results-xml-test-sim-watchos-simulator
path: .out/test-results/**/*.xml
if-no-files-found: ignore
test-sim-tvos-simulator:
if: github.repository_owner == 'apple'
runs-on:
- self-hosted
- macos
env:
XCODE_VERSION: '26.1'
DEVELOPER_DIR: /Applications/Xcode_26.1.app
steps:
- uses: actions/checkout@v5
- run: brew install gmp libyaml
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
- run: gem install xcpretty
- name: xcodebuild test
env:
LC_CTYPE: en_US.UTF-8
run: |-
xcodebuild -scheme pkl-swift-Package -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation)' ONLY_ACTIVE_ARCH=YES CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=YES COMPILER_INDEX_STORE_ENABLE=NO test \
| xcpretty --report junit --output .out/test-results/test-sim-tvos-simulator.xml
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@v5
with:
name: test-results-xml-test-sim-tvos-simulator
path: .out/test-results/**/*.xml
if-no-files-found: ignore
test-sim-mac-catalyst:
if: github.repository_owner == 'apple'
runs-on:
- self-hosted
- macos
env:
XCODE_VERSION: '26.1'
DEVELOPER_DIR: /Applications/Xcode_26.1.app
steps:
- uses: actions/checkout@v5
- run: brew install gmp libyaml
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
- run: gem install xcpretty
- name: xcodebuild test
env:
LC_CTYPE: en_US.UTF-8
run: |-
xcodebuild -scheme pkl-swift-Package -sdk macosx -destination 'platform=macOS,variant=Mac Catalyst,arch=arm64' ONLY_ACTIVE_ARCH=YES CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO ARCH=arm64 VALID_ARCHS=arm64 SUPPORTS_MACCATALYST=YES TARGETED_DEVICE_FAMILY=2 CODE_SIGN_IDENTITY=- test \
| xcpretty --report junit --output .out/test-results/test-sim-mac-catalyst.xml
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@v5
with:
name: test-results-xml-test-sim-mac-catalyst
path: .out/test-results/**/*.xml
if-no-files-found: ignore
test-format-license-headers:
name: hawkeye-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- run: hawkeye check --config licenserc.toml --fail-if-unknown
container:
image: ghcr.io/korandoru/hawkeye@sha256:c3ab994c0d81f3d116aabf9afc534e18648e3e90d7525d741c1e99dd8166ec85
test-format-swift:
name: test-format-swift
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: make swiftformat-lint
container:
image: swift:6.1-rhel-ubi9
test-format-pkl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Pkl
id: setup-pkl
env:
PKL_VERSION: 0.30.0
PKL_FILENAME: pkl
PKL_DOWNLOAD_URL: https://github.com/apple/pkl/releases/download/0.30.0/pkl-linux-amd64
shell: bash
run: |-
DIR="$(mktemp -d /tmp/pkl-$PKL_VERSION-XXXXXX)"
PKL_EXEC="$DIR/$PKL_FILENAME"
curl -sfL -o $PKL_EXEC "$PKL_DOWNLOAD_URL"
chmod +x $PKL_EXEC
echo "$DIR" >> "$GITHUB_PATH"
echo "pkl_exec=$PKL_EXEC" >> "$GITHUB_OUTPUT"
- run: make pkl-format-lint
upload-event-file:
runs-on: ubuntu-latest
steps:
- name: Upload event file
if: '!cancelled()'
uses: actions/upload-artifact@v5
with:
name: test-results-event-file
path: ${{ github.event_path }}
check-pkl-github-actions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Pkl
id: setup-pkl
env:
PKL_VERSION: 0.30.0
PKL_FILENAME: pkl
PKL_DOWNLOAD_URL: https://github.com/apple/pkl/releases/download/0.30.0/pkl-linux-amd64
shell: bash
run: |-
DIR="$(mktemp -d /tmp/pkl-$PKL_VERSION-XXXXXX)"
PKL_EXEC="$DIR/$PKL_FILENAME"
curl -sfL -o $PKL_EXEC "$PKL_DOWNLOAD_URL"
chmod +x $PKL_EXEC
echo "$DIR" >> "$GITHUB_PATH"
echo "pkl_exec=$PKL_EXEC" >> "$GITHUB_OUTPUT"
- shell: bash
run: pkl eval -m .github/ --project-dir .github/ .github/index.pkl
- name: check git status
shell: bash
run: |-
if [ -n "$(git status --porcelain)" ]; then
echo "Running pkl resulted in a diff! You likely need to run 'pkl eval' and commit the changes."
git diff --name-only
exit 1
fi