Update C++ language standard to fix build with newer icu #178
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: Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
permissions: | |
contents: read | |
jobs: | |
variables: | |
outputs: | |
max-supported-swift-version: '6.0' | |
xcode-scheme: simple-formatting | |
xcode-platform-version: latest | |
fail-if-codecov-fails: 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- run: exit 0 | |
test-spm: | |
needs: variables | |
strategy: | |
matrix: | |
os: [ macOS, ubuntu ] | |
swift-version-offset: [ 0, 1, 2 ] | |
uses: sersoft-gmbh/oss-common-actions/.github/workflows/swift-test-spm.yml@main | |
with: | |
os: ${{ matrix.os }} | |
max-swift-version: ${{ needs.variables.outputs.max-supported-swift-version }} | |
swift-version-offset: ${{ matrix.swift-version-offset }} | |
# This is a workaround since Swift ships ICU headers that aren't aligned with the installed ICU package. | |
# Apparently, on recent macOS runners, icu is also not aligned... | |
before-run: | | |
if [ "${IS_IN_CONTAINER:-}" -eq 1 ]; then | |
apt-get update -qq && apt-get -q install -y --reinstall libicu-dev | |
else | |
brew update && brew install icu4c || exit 0 | |
fi | |
fail-if-codecov-fails: ${{ fromJson(needs.variables.outputs.fail-if-codecov-fails) }} | |
secrets: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
test-xcode: | |
needs: variables | |
strategy: | |
matrix: | |
platform: | |
- macOS | |
# - iOS | |
# - iPadOS | |
# - tvOS | |
# - watchOS | |
swift-version-offset: [ 0, 1, 2 ] | |
uses: sersoft-gmbh/oss-common-actions/.github/workflows/swift-test-xcode.yml@main | |
with: | |
xcode-scheme: ${{ needs.variables.outputs.xcode-scheme }} | |
max-swift-version: ${{ needs.variables.outputs.max-supported-swift-version }} | |
swift-version-offset: ${{ matrix.swift-version-offset }} | |
platform: ${{ matrix.platform }} | |
platform-version: ${{ needs.variables.outputs.xcode-platform-version }} | |
# This is a workaround since Swift ships ICU headers that aren't aligned with the installed ICU package. | |
# Apparently, on recent macOS runners, icu is also not aligned... | |
before-run: brew update && brew install icu4c || exit 0 | |
fail-if-codecov-fails: ${{ fromJson(needs.variables.outputs.fail-if-codecov-fails) }} | |
secrets: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |