From 7174a81563263394153ec1413d2de8efc4405d6b Mon Sep 17 00:00:00 2001 From: Robert Date: Fri, 27 Nov 2020 11:27:19 +0000 Subject: [PATCH 1/5] test Go autobuild --- .github/workflows/integration-testing.yml | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/integration-testing.yml b/.github/workflows/integration-testing.yml index b014cc898..1213f175d 100644 --- a/.github/workflows/integration-testing.yml +++ b/.github/workflows/integration-testing.yml @@ -129,6 +129,33 @@ jobs: env: TEST_MODE: true + go-custom-tracing-autobuild: + # No need to test Go autobuild on multiple OSes since + # we're testing Go custom tracing with a manual build on all OSes. + runs-on: ubuntu-latest + env: + CODEQL_EXTRACTOR_GO_BUILD_TRACING: "on" + + steps: + - uses: actions/setup-go@v2 + if: ${{ matrix.os == 'macos-latest' }} + with: + go-version: '^1.13.1' + - uses: actions/checkout@v2 + - name: Move codeql-action + shell: bash + run: | + mkdir ../action + mv * .github ../action/ + mv ../action/tests/multi-language-repo/{*,.github} . + - uses: ./../action/init + with: + languages: go + - uses: ./../action/autobuild + - uses: ./../action/analyze + env: + TEST_MODE: true + multi-language-repo_rubocop: runs-on: ubuntu-latest From 0c33f016fac7b8323d52fa95ef15563a08e6113c Mon Sep 17 00:00:00 2001 From: Chris Gavin Date: Fri, 27 Nov 2020 12:04:35 +0000 Subject: [PATCH 2/5] Update the default bundle to `codeql-bundle-20201127`. --- lib/defaults.json | 2 +- src/defaults.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/defaults.json b/lib/defaults.json index ba44114bb..29b8924a4 100644 --- a/lib/defaults.json +++ b/lib/defaults.json @@ -1,3 +1,3 @@ { - "bundleVersion": "codeql-bundle-20201106" + "bundleVersion": "codeql-bundle-20201127" } diff --git a/src/defaults.json b/src/defaults.json index fba2bb36c..700ede6e6 100644 --- a/src/defaults.json +++ b/src/defaults.json @@ -1,3 +1,3 @@ { - "bundleVersion": "codeql-bundle-20201106" + "bundleVersion": "codeql-bundle-20201127" } From 38ed96450e9cd34e40d8a49a7c170480a0973581 Mon Sep 17 00:00:00 2001 From: Robin Neatherway Date: Fri, 27 Nov 2020 17:37:32 +0000 Subject: [PATCH 3/5] Only analyze PRs against main and v1 We can only analyze PRs against those branches we are analyzing on push. --- .github/workflows/codeql.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 88ff7a0a0..420c1ce09 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -4,6 +4,7 @@ on: push: branches: [main, v1] pull_request: + branches: [main, v1] jobs: build: From b1fd75309c87f6cfc6a7646e5766f411f7099547 Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 30 Nov 2020 12:28:26 +0000 Subject: [PATCH 4/5] Update .github/workflows/integration-testing.yml Co-authored-by: Chris Gavin --- .github/workflows/integration-testing.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/integration-testing.yml b/.github/workflows/integration-testing.yml index 1213f175d..2d74b733f 100644 --- a/.github/workflows/integration-testing.yml +++ b/.github/workflows/integration-testing.yml @@ -137,10 +137,6 @@ jobs: CODEQL_EXTRACTOR_GO_BUILD_TRACING: "on" steps: - - uses: actions/setup-go@v2 - if: ${{ matrix.os == 'macos-latest' }} - with: - go-version: '^1.13.1' - uses: actions/checkout@v2 - name: Move codeql-action shell: bash From fb2a3bf840a7a5949da81e177fae03a010f305f6 Mon Sep 17 00:00:00 2001 From: Chris Gavin Date: Tue, 1 Dec 2020 09:09:02 +0000 Subject: [PATCH 5/5] Add a check to ensure expected CodeQL release files exist. --- .../check-expected-release-files.yml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/check-expected-release-files.yml diff --git a/.github/workflows/check-expected-release-files.yml b/.github/workflows/check-expected-release-files.yml new file mode 100644 index 000000000..56aa62519 --- /dev/null +++ b/.github/workflows/check-expected-release-files.yml @@ -0,0 +1,22 @@ +name: Check Expected Release Files + +on: + pull_request: + paths: + - .github/workflows/check-expected-release-files.yml + - src/defaults.json + +jobs: + check-expected-release-files: + runs-on: ubuntu-latest + + steps: + - name: Checkout CodeQL Action + uses: actions/checkout@v2 + - name: Check Expected Release Files + run: | + bundle_version="$(cat "./src/defaults.json" | jq -r ".bundleVersion")" + set -x + for expected_file in "codeql-bundle.tar.gz" "codeql-bundle-linux64.tar.gz" "codeql-bundle-osx64.tar.gz" "codeql-bundle-win64.tar.gz" "codeql-runner-linux" "codeql-runner-macos" "codeql-runner-win.exe"; do + curl --location --fail --head --request GET "https://github.com/github/codeql-action/releases/download/$bundle_version/$expected_file" > /dev/null + done