Skip to content

Commit

Permalink
Update CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Ye committed Nov 18, 2023
1 parent e6a200c commit 0e1451e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 125 deletions.
80 changes: 4 additions & 76 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,89 +7,18 @@ on:
branches: [master]

jobs:
# This job is not a part of the macos_test job because of
# the 'This copy of libswiftCore.dylib requires an OS version prior to 10.14.4.' error.
# We have to invoke install_name_tool and patch the test executable
# to work around this error.
#
# Other combinations of Xcode and macOS versions don't lead to this error.
swift_5_0_test:
name: Execute tests (macos-10.15, 10.3)
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "10.3"
- name: Swift version
run: swift --version
- name: Build and run tests in debug mode with coverage
run: |
swift build \
--build-tests \
-c debug \
-Xswiftc -warnings-as-errors \
-Xswiftc -profile-generate \
-Xswiftc -profile-coverage-mapping \
--build-path .build-test-debug
install_name_tool \
-rpath /Applications/Xcode_10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx /usr/lib/swift \
.build-test-debug/debug/OpenCombinePackageTests.xctest/Contents/MacOS/OpenCombinePackageTests
install_name_tool \
-add_rpath /Applications/Xcode_10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx \
.build-test-debug/debug/OpenCombinePackageTests.xctest/Contents/MacOS/OpenCombinePackageTests
swift test \
--skip-build \
--enable-code-coverage \
--build-path .build-test-debug
xcrun llvm-cov show \
-instr-profile=.build-test-debug/debug/codecov/default.profdata \
.build-test-debug/debug/OpenCombinePackageTests.xctest/Contents/MacOS/OpenCombinePackageTests \
> coverage.txt
- name: Build and run tests in release mode
run: |
swift build \
--build-tests \
-c release \
-Xswiftc -warnings-as-errors \
-Xswiftc -profile-generate \
-Xswiftc -profile-coverage-mapping \
--build-path .build-test-release
install_name_tool \
-rpath /Applications/Xcode_10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx /usr/lib/swift \
.build-test-release/release/OpenCombinePackageTests.xctest/Contents/MacOS/OpenCombinePackageTests
install_name_tool \
-add_rpath /Applications/Xcode_10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx \
.build-test-release/release/OpenCombinePackageTests.xctest/Contents/MacOS/OpenCombinePackageTests
swift test \
--skip-build \
-c release \
--enable-code-coverage \
--build-path .build-test-release
- uses: codecov/codecov-action@v2
with:
verbose: true
macos_test:
name: Execute tests
strategy:
fail-fast: false
matrix:
include:
- os: macos-10.15
xcode-version: "11.3.1" # Swift 5.1.3
- os: macos-10.15
xcode-version: "11.7" # Swift 5.2.4
- os: macos-11
xcode-version: "12.4" # Swift 5.3.2
- os: macos-11
xcode-version: "12.5.1" # Swift 5.4.2
- os: macos-11
xcode-version: "13.2.1" # Swift 5.5.2
- os: macos-12
xcode-version: "13.4.1" # Swift 5.6.1
- os: macos-12
xcode-version: "14.2" # Swift 5.7.2
- os: macos-13
xcode-version: "14.3.1" # Swift 5.8.1
- os: macos-13
xcode-version: "15.0.1" # Swift 5.9
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -111,7 +40,6 @@ jobs:
.build-test-debug/debug/OpenCombinePackageTests.xctest/Contents/MacOS/OpenCombinePackageTests \
> coverage.txt
- name: Build and run tests in debug mode with TSan
if: ${{ matrix.xcode-version != '13.2.1' && matrix.xcode-version != '13.4.1' }} # https://bugs.swift.org/browse/SR-15444
run: |
swift test \
-c debug \
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,11 @@ jobs:
strategy:
fail-fast: false
matrix:
swift_version: ["5.0", "5.1", "5.2", "5.3", "5.4", "5.5", "5.6", "5.7"]
swift_version: ["5.7", "5.8", "5.9"]
runs-on: ubuntu-latest
container: swift:${{ matrix.swift_version }}-bionic
steps:
- uses: actions/checkout@v2
- name: Generating LinuxMain.swift
if: >-
${{ matrix.swift_version == '5.0' ||
matrix.swift_version == '5.1' ||
matrix.swift_version == '5.2' ||
matrix.swift_version == '5.3' }}
run: |
apt update -y
apt upgrade -y
apt install -y python3.8
python3.8 utils/discover_tests.py
- name: Building and running tests in debug mode with coverage
run: |
swift test \
Expand All @@ -40,7 +29,6 @@ jobs:
.build-test-debug/debug/OpenCombinePackageTests.xctest \
> coverage.txt
- name: Building and running tests in debug mode with TSan
if: ${{ matrix.swift_version != '5.0' }} # There are false positives there
run: |
swift test \
-c debug \
Expand Down
47 changes: 16 additions & 31 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,27 @@ on:
branches: [master]

jobs:
carton_wasmer_test_5_3:
name: "Execute tests on Wasm (Swift 5.3)"
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: swiftwasm/[email protected]

carton_wasmer_test_5_4:
name: "Execute tests on Wasm (Swift 5.4)"
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: swiftwasm/[email protected]

carton_wasmer_test_5_5:
name: "Execute tests on Wasm (Swift 5.5)"
carton_wasmer_test_5_7:
name: "Execute tests on Wasm (Swift 5.7)"
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: swiftwasm/swiftwasm-action@v5.5
- uses: swiftwasm/swiftwasm-action@v5.7

carton_wasmer_test_5_6:
name: "Execute tests on Wasm (Swift 5.6)"
runs-on: ubuntu-20.04
# swiftwasm/[email protected] and @v5.9 is not supported upstream
# carton_wasmer_test_5_8:
# name: "Execute tests on Wasm (Swift 5.8)"
# runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: swiftwasm/swiftwasm-action@v5.6
# steps:
# - uses: actions/checkout@v2
# - uses: swiftwasm/swiftwasm-action@v5.8

carton_wasmer_test_5_7:
name: "Execute tests on Wasm (Swift 5.7)"
runs-on: ubuntu-20.04
# carton_wasmer_test_5_9:
# name: "Execute tests on Wasm (Swift 5.9)"
# runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: swiftwasm/swiftwasm-action@v5.7
# steps:
# - uses: actions/checkout@v2
# - uses: swiftwasm/swiftwasm-action@v5.9
8 changes: 3 additions & 5 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ jobs:
matrix:
include:
- os: windows-2019
swift_version: "5.4.2"
- os: windows-2019
swift_version: "5.5.1"
swift_version: "5.7.2"
- os: windows-2019
swift_version: "5.6.1"
swift_version: "5.8.1"
- os: windows-2019
swift_version: "5.7.2"
swift_version: "5.9.1"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit 0e1451e

Please sign in to comment.