Skip to content

Bump fast-xml-parser from 5.2.3 to 5.4.2 in /docs #4

Bump fast-xml-parser from 5.2.3 to 5.4.2 in /docs

Bump fast-xml-parser from 5.2.3 to 5.4.2 in /docs #4

Workflow file for this run

name: Build and run tests
on:
push:
branches: [ "main*" ]
pull_request:
branches: [ "main*" ]
schedule:
- cron: "0 20 * * 3"
workflow_dispatch:
inputs:
run-windows-tests:
description: "Run Windows tests"
required: true
default: true
type: boolean
run-macos-tests:
description: "Run macOS tests"
required: true
default: true
type: boolean
run-macos-intel-tests:
description: "Run macOS (Intel) tests"
required: true
default: true
type: boolean
run-linux-tests:
description: "Run Linux tests"
required: true
default: true
type: boolean
jobs:
prepare-matrix:
name: Prepare matrix
runs-on: ubuntu-latest
outputs:
platforms: ${{ steps.prepare-matrix.outputs.platforms }}
runners: ${{ steps.prepare-matrix.outputs.runners }}
steps:
- name: Prepare matrix
id: prepare-matrix
shell: pwsh
run: |
$eventName = "${{ github.event_name }}";
switch ($eventName) {
"schedule" {
$platforms = @("windows", "macos", "macos-intel", "linux");
}
"workflow_dispatch" {
$platforms = @();
if ("${{ github.event.inputs['run-windows-tests'] || 'false' }}" -eq "true") { $platforms += "windows"; }
if ("${{ github.event.inputs['run-macos-tests'] || 'false' }}" -eq "true") { $platforms += "macos"; }
if ("${{ github.event.inputs['run-macos-intel-tests'] || 'false' }}" -eq "true") { $platforms += "macos-intel"; }
if ("${{ github.event.inputs['run-linux-tests'] || 'false' }}" -eq "true") { $platforms += "linux"; }
}
default {
$platforms = @("windows", "macos");
}
}
$platformsJson = $platforms | ConvertTo-Json -Compress -AsArray;
$runnersJson = @{
windows = "windows-latest";
macos = "macos-latest";
"macos-intel" = "macos-15-intel";
linux = "ubuntu-latest-x64-large-4";
} | ConvertTo-Json -Compress;
"platforms=$platformsJson" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append;
"runners=$runnersJson" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append;
build-and-test:
name: Build and run unit tests
timeout-minutes: 360
needs: prepare-matrix
if: ${{ (needs.prepare-matrix.outputs.platforms || '[]') != '[]' }}
strategy:
fail-fast: false
matrix:
test-name:
- cargo-tests
- examples-app
- examples-audio-cpp-app
- examples-custom-types
- examples-tokio-blake3-app
- examples-tokio-boring-app
- gradle-plugin-tests
- gradle-tests
- uniffi-tests
- uniffi-tests-gir
- uniffi-tests-oc
- uniffi-tests-gir-oc
- uniffi-tests-im
platform: ${{ fromJSON(needs.prepare-matrix.outputs.platforms) }}
runs-on: ${{ fromJSON(needs.prepare-matrix.outputs.runners)[matrix.platform] }}
steps:
- name: Check out the main branch
uses: actions/checkout@v4
- name: Show space left before installing dependencies
run: df -h
- name: Install Zig
shell: pwsh
run: ./.github/workflows/pr-build-test/dependencies-zig.ps1
- name: Install dependencies
shell: pwsh
run: ./.github/workflows/pr-build-test/dependencies.ps1
- name: Set up Java 17
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Set up the Android SDK
uses: android-actions/setup-android@v3
- name: Install additional required Android SDK packages and configure environment variables
shell: pwsh
run: |
sdkmanager --install "ndk;27.0.12077973"
"ANDROID_HOME=${env:ANDROID_SDK_ROOT}" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
- name: Show space left before running the test
run: df -h
- name: Run tests
shell: pwsh
run: ./.github/workflows/pr-build-test/${{ matrix.test-name }}.ps1
- name: Show space left after running the test
if: always()
run: df -h
- name: Upload test results
uses: actions/upload-artifact@v4
if: ${{ matrix.test-name != 'cargo-tests' && (success() || failure()) }}
with:
name: junit-test-results-${{ matrix.test-name }}-${{ matrix.platform }}
path: "./.github/workflows/pr-build-test/test-results/**/*est/TEST-*.xml"
retention-days: 1