File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,22 @@ description: Fetches the latest version of CodeQL
3
3
runs :
4
4
using : composite
5
5
steps :
6
+ - name : Select platform - Linux
7
+ if : runner.os == 'Linux'
8
+ shell : bash
9
+ run : echo "GA_CODEQL_CLI_PLATFORM=linux64" >> $GITHUB_ENV
10
+
11
+ - name : Select platform - MacOS
12
+ if : runner.os == 'MacOS'
13
+ shell : bash
14
+ run : echo "GA_CODEQL_CLI_PLATFORM=osx64" >> $GITHUB_ENV
15
+
6
16
- name : Fetch CodeQL
7
17
shell : bash
8
18
run : |
9
19
LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | grep -v beta | sort --version-sort | tail -1)
10
- gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64 .zip "$LATEST"
11
- unzip -q -d "${RUNNER_TEMP}" codeql-linux64 .zip
20
+ gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-$GA_CODEQL_CLI_PLATFORM .zip "$LATEST"
21
+ unzip -q -d "${RUNNER_TEMP}" codeql-$GA_CODEQL_CLI_PLATFORM .zip
12
22
echo "${RUNNER_TEMP}/codeql" >> "${GITHUB_PATH}"
13
23
env :
14
24
GITHUB_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change @@ -20,19 +20,26 @@ jobs:
20
20
- name : Check QL formatting
21
21
run : find ql "(" -name "*.ql" -or -name "*.qll" ")" -print0 | xargs -0 codeql query format --check-only
22
22
qltest :
23
- runs-on : ubuntu-latest
23
+ runs-on : ${{ matrix.os }}
24
24
strategy :
25
25
fail-fast : false
26
+ matrix :
27
+ os : [ubuntu-20.04, macos-latest]
26
28
steps :
27
29
- uses : actions/checkout@v2
28
30
- uses : ./.github/actions/fetch-codeql
29
- - name : Install bazelisk
31
+ - name : Install bazelisk - Linux
32
+ if : runner.os == 'Linux'
30
33
run : |
31
34
sudo apt-get update
32
35
sudo apt-get install -y wget
33
36
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64
34
37
mv bazelisk-linux-amd64 /usr/local/bin/bazel
35
38
chmod +x /usr/local/bin/bazel
39
+ - name : Install bazelisk - macOS
40
+ if : runner.os == 'MacOS'
41
+ run : |
42
+ brew install bazelisk
36
43
- name : Build Swift extractor
37
44
run : |
38
45
bazel run //swift:create-extractor-pack
41
48
codeql test run --threads=0 --ram 5000 --search-path "${{ github.workspace }}/swift/extractor-pack" --check-databases --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition ql/test
42
49
env :
43
50
GITHUB_TOKEN : ${{ github.token }}
51
+
You can’t perform that action at this time.
0 commit comments