Runtime+Discovery: Implement Discovery as a ConfigProvider. #71
Workflow file for this run
This file contains hidden or 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: Check | |
| on: | |
| workflow_dispatch: {} | |
| pull_request: {} | |
| # When a new revision is pushed to a PR, cancel all in-progress CI runs for that | |
| # PR. See https://docs.github.com/en/actions/using-jobs/using-concurrency | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| ci: | |
| name: Build Swift ${{ matrix.swift }}${{ matrix.xcode && format(', Xcode {0}', matrix.xcode) || '' }} (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| xcode: "16.2" | |
| swift: "6.0.3" | |
| - os: macos-latest | |
| xcode: "16.4" | |
| swift: "6.1" # We can't go more modern than 6.1.0 for the 6.1 runner, due to Xcode version support. | |
| - os: macos-latest | |
| xcode: "26.2" | |
| swift: "6.2.3" | |
| - os: ubuntu-latest | |
| swift: "6.0.3" | |
| - os: ubuntu-latest | |
| swift: "6.2" | |
| env: | |
| XCODE_VERSION: ${{ matrix.xcode }} | |
| DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app" | |
| SWIFT_VERSION: ${{ matrix.swift }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Select Xcode version | |
| if: runner.os == 'macOS' | |
| run: | | |
| sudo xcode-select --switch "${DEVELOPER_DIR}/Contents/Developer" | |
| xcodebuild -version | |
| - name: Setup Swiftly, installing toolchain version ${{ matrix.swift }} | |
| if: runner.os == 'Linux' | |
| run: | | |
| echo "${{ matrix.swift }}" >> .swift-version | |
| ./tools/build/setup-swiftly.sh --install-swiftly | |
| - name: Show Swift version | |
| run: swift --version | |
| - name: Fail if Swift version does not match expected version (${{ matrix.swift }}) | |
| run: | | |
| SWIFT_OUTPUT=$(swift --version) | |
| echo "${SWIFT_OUTPUT}" | |
| # Check if our expected Swift version is the one in use. | |
| if ! echo "${SWIFT_OUTPUT}" | grep -q "${SWIFT_VERSION}"; then | |
| ACTUAL=$(echo "${SWIFT_OUTPUT}" | head -n 1 | grep -oE '[0-9]+\.[0-9]+(\.[0-9]+)?' | head -n 1) | |
| echo "::error::Expected Swift ${SWIFT_VERSION}, got ${ACTUAL}" | |
| echo "**Version Mismatch**: Expected \`${SWIFT_VERSION}\`, got \`${ACTUAL}\`" >> $GITHUB_STEP_SUMMARY | |
| exit 1 | |
| fi | |
| - name: Install jemalloc | |
| if: runner.os == 'macOS' | |
| run: brew install jemalloc | |
| - name: Lint | |
| run: make lint | |
| - name: Test | |
| run: make test | |
| - name: Build | |
| run: make build | |
| gh-actions-lint: | |
| name: Github Actions Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Run zizmor | |
| uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2 |