Compare commits

...

12 Commits

Author SHA1 Message Date
Cornelius Riemenschneider
dfd54fee64 Update __autobuild-macos-dotnet.yml 2022-07-22 12:37:44 +02:00
Cornelius Riemenschneider
fc61332304 Update __autobuild-macos-dotnet.yml 2022-07-22 12:32:31 +02:00
Cornelius Riemenschneider
35218036de Update __autobuild-macos-dotnet.yml 2022-07-22 12:26:52 +02:00
Cornelius Riemenschneider
fbcce35bbf Update __autobuild-macos-dotnet.yml 2022-07-22 12:18:44 +02:00
Cornelius Riemenschneider
5cbac1c2c5 Update __autobuild-macos-dotnet.yml
enable relocator
2022-07-22 11:29:52 +02:00
Cornelius Riemenschneider
4f57ff0df1 Update __autobuild-macos-dotnet.yml
generate and upload log
2022-07-22 11:20:38 +02:00
Aditya Sharad
e4a8b02bc5 DEBUG: Remove CLR tracer env vars 2022-07-21 15:17:32 -07:00
Aditya Sharad
ada32408de DEBUG: Add DYLD_INSERT_LIBRARIES to the environment before autobuild 2022-07-21 15:03:41 -07:00
Aditya Sharad
11ae525cfd DEBUG: Copy the Runner C# autobuild test for macOS 2022-07-21 14:26:25 -07:00
Aditya Sharad
8e97061217 DEBUG: Attempt to turn off CLR tracer in test workflow 2022-07-21 13:33:20 -07:00
Aditya Sharad
9e009f1864 DEBUG: Stop most PR checks from running on synchronize events 2022-07-21 13:22:33 -07:00
Arthur Baars
8a65a9e73d Revert changes 2022-07-21 19:45:21 +02:00
34 changed files with 94 additions and 85 deletions

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -3,7 +3,7 @@
# pip install ruamel.yaml && python3 sync.py
# to regenerate this file.
name: 'PR Check - Autobuild '
name: 'PR Check - Autobuild C# on macOS'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
@@ -13,6 +13,7 @@ on:
- main
- releases/v1
- releases/v2
- aibaars/runner-autobuilders
pull_request:
types:
- opened
@@ -21,44 +22,87 @@ on:
- ready_for_review
workflow_dispatch: {}
jobs:
autobuild-macos-dotnet:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-2019
version: latest
- os: windows-2022
version: latest
name: 'Autobuild '
runner-analyze-csharp-autobuild-macos:
name: Runner macos autobuild C# analyze
runs-on: macos-latest
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Prepare test
id: prepare-test
uses: ./.github/prepare-test
with:
version: ${{ matrix.version }}
- uses: ./../action/init
with:
languages: csharp
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/autobuild
- uses: ./../action/analyze
env:
TEST_MODE: true
- name: Check database
shell: bash
run: |
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d csharp ]]; then
echo "Did not find a C# database"
exit 1
fi
env:
INTERNAL_CODEQL_ACTION_DEBUG_LOC: true
- uses: actions/checkout@v3
- name: Move codeql-action
shell: bash
run: |
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
mv ../action/.github/workflows .github
- name: Build runner
run: |
cd ../action/runner
npm install
npm run build-runner
- name: Run init
run: |
../action/runner/dist/codeql-runner-macos init --repository $GITHUB_REPOSITORY --languages csharp --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Load environment variable
shell: bash
run: |
echo "Initial environment"
cat codeql-runner/codeql-env.json | jq
DYLD="$(cat codeql-runner/codeql-env.json | jq -r '.DYLD_INSERT_LIBRARIES')"
echo "$DYLD"
echo "DYLD_INSERT_LIBRARIES=$DYLD" >> "$GITHUB_ENV"
LOG="$(cat codeql-runner/codeql-env.json | jq -r '.CODEQL_TRACER_LOG')"
echo "$LOG"
echo "CODEQL_TRACER_LOG=$LOG" >> "$GITHUB_ENV"
SEMMLE_COPY_EXECUTABLES_ROOT="$(cat codeql-runner/codeql-env.json | jq -r '.SEMMLE_COPY_EXECUTABLES_ROOT')"
echo "$SEMMLE_COPY_EXECUTABLES_ROOT"
echo "SEMMLE_COPY_EXECUTABLES_ROOT=$SEMMLE_COPY_EXECUTABLES_ROOT" >> "$GITHUB_ENV"
SEMMLE_PRELOAD_libtrace="$(cat codeql-runner/codeql-env.json | jq -r '.SEMMLE_PRELOAD_libtrace')"
echo "$SEMMLE_PRELOAD_libtrace"
echo "SEMMLE_PRELOAD_libtrace=$SEMMLE_PRELOAD_libtrace" >> "$GITHUB_ENV"
CODEQL_DIST="$(cat codeql-runner/codeql-env.json | jq -r '.CODEQL_DIST')"
echo "$CODEQL_DIST"
echo "CODEQL_DIST=$CODEQL_DIST" >> "$GITHUB_ENV"
CODEQL_PLATFORM="$(cat codeql-runner/codeql-env.json | jq -r '.CODEQL_PLATFORM')"
echo "$CODEQL_PLATFORM"
echo "CODEQL_PLATFORM=$CODEQL_PLATFORM" >> "$GITHUB_ENV"
CODEQL_TOOL_PATH="$(cat codeql-runner/codeql-env.json | jq -r '.CODEQL_TOOL_PATH')"
echo "$CODEQL_TOOL_PATH"
echo "CODEQL_TOOL_PATH=$CODEQL_TOOL_PATH" >> "$GITHUB_ENV"
echo "SEMMLE_DEBUG_TRACER=10000" >> "$GITHUB_ENV"
CODEQL_SCRATCH_DIR="$(cat codeql-runner/codeql-env.json | jq -r '.CODEQL_SCRATCH_DIR')"
echo "$CODEQL_SCRATCH_DIR"
echo "CODEQL_SCRATCH_DIR=$CODEQL_SCRATCH_DIR" >> "$GITHUB_ENV"
echo "Removing CLR tracer variables"
cat codeql-runner/codeql-env.json | jq 'del(.COR_ENABLE_PROFILING, .COR_PROFILER, .COR_PROFILER_PATH_64, .CORECLR_ENABLE_PROFILING, .CORECLR_PROFILER, .CORECLR_PROFILER_PATH_64)' > codeql-env.temp.json
mv codeql-env.temp.json codeql-runner/codeql-env.json
echo "Final environment"
cat codeql-runner/codeql-env.json | jq
env
- name: Build code
shell: bash
run: |
env
# No CODEQL_RUNNER prefix.
# No explicit sourcing of the tracing environment. We assume the autobuild command loads the tracing environment.
../action/runner/dist/codeql-runner-macos autobuild
- uses: actions/upload-artifact@v3
if: always()
with:
name: debug-artifact-log
path: |
/Users/runner/work/codeql-action/codeql-action/codeql-runner/codeql_databases
- name: Run analyze
run: |
../action/runner/dist/codeql-runner-macos analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

1
.github/workflows/__test-proxy.yml generated vendored
View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

1
.github/workflows/__test-ruby.yml generated vendored
View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -16,7 +16,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -7,7 +7,7 @@ on:
- src/defaults.json
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows.
types: [opened, synchronize, reopened, ready_for_review]
types: [opened, reopened, ready_for_review]
jobs:
check-expected-release-files:

View File

@@ -7,7 +7,7 @@ on:
branches: [main, releases/v1, releases/v2]
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows.
types: [opened, synchronize, reopened, ready_for_review]
types: [opened, reopened, ready_for_review]
jobs:
check-for-conflicts:

View File

@@ -7,7 +7,7 @@ on:
branches: [main, releases/v1, releases/v2]
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows.
types: [opened, synchronize, reopened, ready_for_review]
types: [opened, reopened, ready_for_review]
jobs:
# Identify the CodeQL tool versions to use in the analysis job.

View File

@@ -11,7 +11,6 @@ on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}

View File

@@ -6,7 +6,7 @@ on:
pull_request:
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows.
types: [opened, synchronize, reopened, ready_for_review]
types: [opened, reopened, ready_for_review]
workflow_dispatch:
jobs:

View File

@@ -6,7 +6,7 @@ on:
pull_request:
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows.
types: [opened, synchronize, reopened, ready_for_review]
types: [opened, reopened, ready_for_review]
jobs:
test-setup-python-scripts:

View File

@@ -1,7 +1,7 @@
name: Update dependencies
on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review, labeled]
types: [opened, reopened, ready_for_review, labeled]
jobs:
update:

10
lib/codeql.js generated
View File

@@ -510,13 +510,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
"-Dhttp.keepAlive=false",
"-Dmaven.wagon.http.pool=false",
].join(" ");
const runnerExe = process.env["CODEQL_RUNNER"];
if (runnerExe) {
await runTool(runnerExe, [autobuildCmd]);
}
else {
await runTool(autobuildCmd);
}
await runTool(autobuildCmd);
},
async extractScannedLanguage(databasePath, language, featureFlags) {
// Get extractor location
@@ -808,4 +802,4 @@ async function runTool(cmd, args = []) {
throw new CommandInvocationError(cmd, args, exitCode, error);
return output;
}
//# sourceMappingURL=codeql.js.map
//# sourceMappingURL=codeql.js.map

File diff suppressed because one or more lines are too long

View File

@@ -780,12 +780,7 @@ async function getCodeQLForCmd(
"-Dmaven.wagon.http.pool=false",
].join(" ");
const runnerExe = process.env["CODEQL_RUNNER"];
if (runnerExe) {
await runTool(runnerExe, [autobuildCmd]);
} else {
await runTool(autobuildCmd);
}
await runTool(autobuildCmd);
},
async extractScannedLanguage(
databasePath: string,