From e7ce02a54756ee8093ca80641a0f32885661f061 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Mon, 17 Jun 2024 11:36:34 +0100 Subject: [PATCH] Regenerate PR checks --- .github/workflows/__swift-autobuild.yml | 105 +++++++++++++----------- 1 file changed, 56 insertions(+), 49 deletions(-) diff --git a/.github/workflows/__swift-autobuild.yml b/.github/workflows/__swift-autobuild.yml index f2fb325c3..3fc353cea 100644 --- a/.github/workflows/__swift-autobuild.yml +++ b/.github/workflows/__swift-autobuild.yml @@ -11,22 +11,25 @@ env: on: push: branches: - - main - - releases/v2 + - main + - releases/v* pull_request: types: - - opened - - synchronize - - reopened - - ready_for_review + - opened + - synchronize + - reopened + - ready_for_review + schedule: + - cron: '0 5 * * *' workflow_dispatch: {} jobs: swift-autobuild: strategy: + fail-fast: false matrix: include: - - os: macos-latest - version: nightly-latest + - os: macos-latest + version: nightly-latest name: Swift analysis using autobuild permissions: contents: read @@ -34,47 +37,51 @@ jobs: timeout-minutes: 45 runs-on: ${{ matrix.os }} steps: - - name: Check out repository - uses: actions/checkout@v4 - - name: Prepare test - id: prepare-test - uses: ./.github/actions/prepare-test - with: - version: ${{ matrix.version }} - use-all-platform-bundle: 'false' - - name: Set environment variable for Swift enablement - if: >- - runner.os != 'Windows' && ( - matrix.version == '20220908' || - matrix.version == '20221211' - ) - shell: bash - run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV - - uses: ./../action/init - id: init - with: - languages: swift - tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: ./../action/.github/actions/setup-swift - with: - codeql-path: ${{steps.init.outputs.codeql-path}} - - name: Check working directory - shell: bash - run: pwd - - uses: ./../action/autobuild - timeout-minutes: 10 - - uses: ./../action/analyze - id: analysis - with: - upload-database: false - - name: Check database - shell: bash - run: | - SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}" - if [[ ! -d "$SWIFT_DB" ]]; then - echo "Did not create a database for Swift." - exit 1 - fi + - name: Setup Python on MacOS + uses: actions/setup-python@v5 + if: >- + runner.os == 'macOS' && ( + + matrix.version == 'stable-20230403' || + + matrix.version == 'stable-v2.13.5' || + + matrix.version == 'stable-v2.14.6') + with: + python-version: '3.11' + - name: Check out repository + uses: actions/checkout@v4 + - name: Prepare test + id: prepare-test + uses: ./.github/actions/prepare-test + with: + version: ${{ matrix.version }} + use-all-platform-bundle: 'false' + - uses: ./../action/init + id: init + with: + languages: swift + tools: ${{ steps.prepare-test.outputs.tools-url }} + - uses: ./../action/.github/actions/setup-swift + with: + codeql-path: ${{steps.init.outputs.codeql-path}} + - name: Check working directory + shell: bash + run: pwd + - uses: ./../action/autobuild + timeout-minutes: 10 + - uses: ./../action/analyze + id: analysis + with: + upload-database: false + - name: Check database + shell: bash + run: | + SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}" + if [[ ! -d "$SWIFT_DB" ]]; then + echo "Did not create a database for Swift." + exit 1 + fi env: CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: 'true' # Remove when Swift is GA. CODEQL_ACTION_TEST_MODE: true