ci: reorganize jobs #322
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pull_request | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
jobs: | |
soundness: | |
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main | |
with: | |
# Not API stable package (yet) | |
api_breakage_check_enabled: false | |
# FIXME: Something is off with the format task and it gets "stuck", need to investigate | |
format_check_enabled: false | |
license_header_check_project_name: Swift.org | |
test-java: | |
name: Java tests (swift:${{ matrix.swift_version }} jdk:${{matrix.jdk_vendor}} os:${{ matrix.os_version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
swift_version: ['6.0.2'] | |
os_version: ['jammy'] | |
jdk_vendor: ['Corretto'] | |
container: | |
image: ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }} | |
env: | |
JAVA_HOME: "/usr/lib/jvm/default-jdk" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: swiftlang/swift-java/.github/workflows/prepare_env.yml@main | |
# run the actual build | |
- name: Gradle build | |
run: | | |
./gradlew build -x test --no-daemon # just build | |
./gradlew build --info --no-daemon | |
- name: Gradle build (benchmarks) | |
run: | | |
./gradlew compileJmh --info --no-daemon | |
test-swift: | |
name: Swift tests (swift:${{ matrix.swift_version }} jdk:${{matrix.jdk_vendor}} os:${{ matrix.os_version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# swift_version: ['nightly-main'] | |
swift_version: ['6.0.2'] | |
os_version: ['jammy'] | |
jdk_vendor: ['Corretto'] | |
container: | |
image: ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }} | |
env: | |
JAVA_HOME: "/usr/lib/jvm/default-jdk" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: swiftlang/swift-java/.github/workflows/prepare_env.yml@main | |
- name: Test Swift | |
run: "swift test" | |
verify-samples: | |
name: Verify Samples (swift:${{ matrix.swift_version }} jdk:${{matrix.jdk_vendor}} os:${{ matrix.os_version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
swift_version: ['6.0.2'] | |
os_version: ['jammy'] | |
jdk_vendor: ['Corretto'] | |
container: | |
image: ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }} | |
env: | |
JAVA_HOME: "/usr/lib/jvm/default-jdk" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: swiftlang/swift-java/.github/workflows/prepare_env.yml@main | |
- name: Verify Samples (All) | |
run: .github/scripts/validate_samples.sh | |
# TODO: Benchmark compile crashes in CI, enable when nightly toolchains in better shape. | |
# - name: Build (Swift) Benchmarks | |
# run: "swift package --package-path Benchmarks/ benchmark list" |