Skip to content

Commit 878ae4a

Browse files
authored
Merge pull request #1823 from github/henrymercer/setup-swift-more-consistent
PR checks: Make Swift setup more consistent with default setup
2 parents 63602c0 + f128379 commit 878ae4a

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed
Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: "Set up Swift"
2-
description: Sets up an appropriate Swift version if supported on this platform.
1+
name: "Set up Swift on Linux"
2+
description: Sets up an appropriate Swift version on Linux.
33
inputs:
44
codeql-path:
55
description: Path to the CodeQL CLI executable.
@@ -9,21 +9,16 @@ runs:
99
steps:
1010
- name: Get Swift version
1111
id: get_swift_version
12-
if: runner.os != 'Windows'
12+
if: runner.os == 'Linux'
1313
shell: bash
1414
env:
1515
CODEQL_PATH: ${{ inputs.codeql-path }}
1616
run: |
17-
if [[ $RUNNER_OS = "macOS" ]]; then
18-
PLATFORM="osx64"
19-
else # We do not run this step on Windows.
20-
PLATFORM="linux64"
21-
fi
2217
SWIFT_EXTRACTOR_DIR="$("$CODEQL_PATH" resolve languages --format json | jq -r '.swift[0]')"
2318
if [ $SWIFT_EXTRACTOR_DIR = "null" ]; then
2419
VERSION="null"
2520
else
26-
VERSION="$("$SWIFT_EXTRACTOR_DIR/tools/$PLATFORM/extractor" --version | awk '/version/ { print $3 }')"
21+
VERSION="$("$SWIFT_EXTRACTOR_DIR/tools/linux64/extractor" --version | awk '/version/ { print $3 }')"
2722
# Specify 5.x.0, otherwise setup Action will default to latest minor version.
2823
if [ $VERSION = "5.7" ]; then
2924
VERSION="5.7.0"
@@ -37,6 +32,6 @@ runs:
3732
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
3833
3934
- uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
40-
if: runner.os != 'Windows' && steps.get_swift_version.outputs.version != 'null'
35+
if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null'
4136
with:
4237
swift-version: "${{ steps.get_swift_version.outputs.version }}"

.github/workflows/__export-file-baseline-information.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pr-checks/checks/export-file-baseline-information.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ steps:
1111
CODEQL_FILE_BASELINE_INFORMATION: true
1212
- uses: ./../action/.github/actions/setup-swift
1313
with:
14-
codeql-path: ${{steps.init.outputs.codeql-path}}
14+
codeql-path: ${{ steps.init.outputs.codeql-path }}
1515
- name: Build code
1616
shell: bash
1717
run: ./build.sh

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy