From d53a59d051c5638013ff75b15cb9e8a0a52b3991 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Mon, 23 Oct 2023 10:51:37 +0200 Subject: [PATCH 1/6] C++: add deptrace pr-checks --- .github/workflows/__cpp-deptrace-disabled.yml | 104 ++++++++++++++++++ .github/workflows/__cpp-deptrace-enabled.yml | 104 ++++++++++++++++++ pr-checks/checks/cpp-deptrace-disabled.yml | 25 +++++ pr-checks/checks/cpp-deptrace-enabled.yml | 25 +++++ tests/cpp-autobuild/src/build.sh | 5 + tests/cpp-autobuild/src/main.c | 8 ++ 6 files changed, 271 insertions(+) create mode 100644 .github/workflows/__cpp-deptrace-disabled.yml create mode 100644 .github/workflows/__cpp-deptrace-enabled.yml create mode 100644 pr-checks/checks/cpp-deptrace-disabled.yml create mode 100644 pr-checks/checks/cpp-deptrace-enabled.yml create mode 100755 tests/cpp-autobuild/src/build.sh create mode 100644 tests/cpp-autobuild/src/main.c diff --git a/.github/workflows/__cpp-deptrace-disabled.yml b/.github/workflows/__cpp-deptrace-disabled.yml new file mode 100644 index 0000000000..acae19e620 --- /dev/null +++ b/.github/workflows/__cpp-deptrace-disabled.yml @@ -0,0 +1,104 @@ +# Warning: This file is generated automatically, and should not be modified. +# Instead, please modify the template in the pr-checks directory and run: +# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py) +# to regenerate this file. + +name: 'PR Check - Cpp: disabling autoinstalling dependencies' +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GO111MODULE: auto + CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true' +on: + push: + branches: + - main + - releases/v2 + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + workflow_dispatch: {} +jobs: + cpp-deptrace-disabled: + strategy: + matrix: + include: + - os: ubuntu-latest + version: stable-20220908 + - os: macos-latest + version: stable-20220908 + - os: ubuntu-latest + version: stable-20221211 + - os: macos-latest + version: stable-20221211 + - os: ubuntu-latest + version: stable-20230418 + - os: macos-latest + version: stable-20230418 + - os: ubuntu-latest + version: stable-v2.13.5 + - os: macos-latest + version: stable-v2.13.5 + - os: ubuntu-latest + version: stable-v2.14.6 + - os: macos-latest + version: stable-v2.14.6 + - os: ubuntu-latest + version: default + - os: macos-latest + version: default + - os: ubuntu-latest + version: latest + - os: macos-latest + version: latest + - os: ubuntu-latest + version: nightly-latest + - os: macos-latest + version: nightly-latest + name: 'Cpp: disabling autoinstalling dependencies' + permissions: + contents: read + security-events: write + 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 + - name: Test setup + shell: bash + run: | + cp -a ../action/tests/cpp-autobuild autobuild-dir + - uses: ./../action/init + with: + languages: cpp + tools: ${{ steps.prepare-test.outputs.tools-url }} + - uses: ./../action/autobuild + with: + working-directory: autobuild-dir + env: + CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false + - shell: bash + run: | + if ls /usr/bin/errno; then + echo "Did autoinstall errno, and it should not have" + exit 1 + fi + env: + DOTNET_GENERATE_ASPNET_CERTIFICATE: 'false' + CODEQL_ACTION_TEST_MODE: true diff --git a/.github/workflows/__cpp-deptrace-enabled.yml b/.github/workflows/__cpp-deptrace-enabled.yml new file mode 100644 index 0000000000..3edd01b93f --- /dev/null +++ b/.github/workflows/__cpp-deptrace-enabled.yml @@ -0,0 +1,104 @@ +# Warning: This file is generated automatically, and should not be modified. +# Instead, please modify the template in the pr-checks directory and run: +# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py) +# to regenerate this file. + +name: 'PR Check - Cpp: enabling autoinstalling dependencies' +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GO111MODULE: auto + CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true' +on: + push: + branches: + - main + - releases/v2 + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + workflow_dispatch: {} +jobs: + cpp-deptrace-enabled: + strategy: + matrix: + include: + - os: ubuntu-latest + version: stable-20220908 + - os: macos-latest + version: stable-20220908 + - os: ubuntu-latest + version: stable-20221211 + - os: macos-latest + version: stable-20221211 + - os: ubuntu-latest + version: stable-20230418 + - os: macos-latest + version: stable-20230418 + - os: ubuntu-latest + version: stable-v2.13.5 + - os: macos-latest + version: stable-v2.13.5 + - os: ubuntu-latest + version: stable-v2.14.6 + - os: macos-latest + version: stable-v2.14.6 + - os: ubuntu-latest + version: default + - os: macos-latest + version: default + - os: ubuntu-latest + version: latest + - os: macos-latest + version: latest + - os: ubuntu-latest + version: nightly-latest + - os: macos-latest + version: nightly-latest + name: 'Cpp: enabling autoinstalling dependencies' + permissions: + contents: read + security-events: write + 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 + - name: Test setup + shell: bash + run: | + cp -a ../action/tests/cpp-autobuild autobuild-dir + - uses: ./../action/init + with: + languages: cpp + tools: ${{ steps.prepare-test.outputs.tools-url }} + - uses: ./../action/autobuild + with: + working-directory: autobuild-dir + env: + CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true + - shell: bash + run: | + if ! ls /usr/bin/errno; then + echo "Did not autoinstall errno" + exit 1 + fi + env: + DOTNET_GENERATE_ASPNET_CERTIFICATE: 'false' + CODEQL_ACTION_TEST_MODE: true diff --git a/pr-checks/checks/cpp-deptrace-disabled.yml b/pr-checks/checks/cpp-deptrace-disabled.yml new file mode 100644 index 0000000000..3bf3ecbf38 --- /dev/null +++ b/pr-checks/checks/cpp-deptrace-disabled.yml @@ -0,0 +1,25 @@ +name: "Cpp: disabling autoinstalling dependencies" +description: "Checks that running C/C++ autobuild with autoinstalling dependencies explicitly disabled works" +operatingSystems: ["ubuntu", "macos"] +env: + DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" +steps: + - name: Test setup + shell: bash + run: | + cp -a ../action/tests/cpp-autobuild autobuild-dir + - uses: ./../action/init + with: + languages: cpp + tools: ${{ steps.prepare-test.outputs.tools-url }} + - uses: ./../action/autobuild + with: + working-directory: autobuild-dir + env: + CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false + - shell: bash + run: | + if ls /usr/bin/errno; then + echo "Did autoinstall errno, and it should not have" + exit 1 + fi diff --git a/pr-checks/checks/cpp-deptrace-enabled.yml b/pr-checks/checks/cpp-deptrace-enabled.yml new file mode 100644 index 0000000000..a857af855f --- /dev/null +++ b/pr-checks/checks/cpp-deptrace-enabled.yml @@ -0,0 +1,25 @@ +name: "Cpp: enabling autoinstalling dependencies" +description: "Checks that running C/C++ autobuild with autoinstalling dependencies works" +operatingSystems: ["ubuntu", "macos"] +env: + DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" +steps: + - name: Test setup + shell: bash + run: | + cp -a ../action/tests/cpp-autobuild autobuild-dir + - uses: ./../action/init + with: + languages: cpp + tools: ${{ steps.prepare-test.outputs.tools-url }} + - uses: ./../action/autobuild + with: + working-directory: autobuild-dir + env: + CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true + - shell: bash + run: | + if ! ls /usr/bin/errno; then + echo "Did not autoinstall errno" + exit 1 + fi diff --git a/tests/cpp-autobuild/src/build.sh b/tests/cpp-autobuild/src/build.sh new file mode 100755 index 0000000000..8a8ae2683c --- /dev/null +++ b/tests/cpp-autobuild/src/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +errno || true # just a command to check its autoinstallation by deptrace + +gcc -o main main.c diff --git a/tests/cpp-autobuild/src/main.c b/tests/cpp-autobuild/src/main.c new file mode 100644 index 0000000000..846028e8f2 --- /dev/null +++ b/tests/cpp-autobuild/src/main.c @@ -0,0 +1,8 @@ +#include "stdio.h" + +int main(int argc, char **argv) { + if (1) { + printf("Hello, World!\n"); + } +} + From 54e4af648dfabba2a4c7405319c5e378dbacc571 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Mon, 23 Oct 2023 17:42:59 +0200 Subject: [PATCH 2/6] C++: fix autobuild pr-checks to latest codeql-cli version --- .github/workflows/__cpp-deptrace-disabled.yml | 28 ------------------- .github/workflows/__cpp-deptrace-enabled.yml | 28 ------------------- pr-checks/checks/cpp-deptrace-disabled.yml | 1 + pr-checks/checks/cpp-deptrace-enabled.yml | 1 + 4 files changed, 2 insertions(+), 56 deletions(-) diff --git a/.github/workflows/__cpp-deptrace-disabled.yml b/.github/workflows/__cpp-deptrace-disabled.yml index acae19e620..6bf59b5b4f 100644 --- a/.github/workflows/__cpp-deptrace-disabled.yml +++ b/.github/workflows/__cpp-deptrace-disabled.yml @@ -25,38 +25,10 @@ jobs: strategy: matrix: include: - - os: ubuntu-latest - version: stable-20220908 - - os: macos-latest - version: stable-20220908 - - os: ubuntu-latest - version: stable-20221211 - - os: macos-latest - version: stable-20221211 - - os: ubuntu-latest - version: stable-20230418 - - os: macos-latest - version: stable-20230418 - - os: ubuntu-latest - version: stable-v2.13.5 - - os: macos-latest - version: stable-v2.13.5 - - os: ubuntu-latest - version: stable-v2.14.6 - - os: macos-latest - version: stable-v2.14.6 - - os: ubuntu-latest - version: default - - os: macos-latest - version: default - os: ubuntu-latest version: latest - os: macos-latest version: latest - - os: ubuntu-latest - version: nightly-latest - - os: macos-latest - version: nightly-latest name: 'Cpp: disabling autoinstalling dependencies' permissions: contents: read diff --git a/.github/workflows/__cpp-deptrace-enabled.yml b/.github/workflows/__cpp-deptrace-enabled.yml index 3edd01b93f..2d964f7311 100644 --- a/.github/workflows/__cpp-deptrace-enabled.yml +++ b/.github/workflows/__cpp-deptrace-enabled.yml @@ -25,38 +25,10 @@ jobs: strategy: matrix: include: - - os: ubuntu-latest - version: stable-20220908 - - os: macos-latest - version: stable-20220908 - - os: ubuntu-latest - version: stable-20221211 - - os: macos-latest - version: stable-20221211 - - os: ubuntu-latest - version: stable-20230418 - - os: macos-latest - version: stable-20230418 - - os: ubuntu-latest - version: stable-v2.13.5 - - os: macos-latest - version: stable-v2.13.5 - - os: ubuntu-latest - version: stable-v2.14.6 - - os: macos-latest - version: stable-v2.14.6 - - os: ubuntu-latest - version: default - - os: macos-latest - version: default - os: ubuntu-latest version: latest - os: macos-latest version: latest - - os: ubuntu-latest - version: nightly-latest - - os: macos-latest - version: nightly-latest name: 'Cpp: enabling autoinstalling dependencies' permissions: contents: read diff --git a/pr-checks/checks/cpp-deptrace-disabled.yml b/pr-checks/checks/cpp-deptrace-disabled.yml index 3bf3ecbf38..c904ef6a6e 100644 --- a/pr-checks/checks/cpp-deptrace-disabled.yml +++ b/pr-checks/checks/cpp-deptrace-disabled.yml @@ -1,6 +1,7 @@ name: "Cpp: disabling autoinstalling dependencies" description: "Checks that running C/C++ autobuild with autoinstalling dependencies explicitly disabled works" operatingSystems: ["ubuntu", "macos"] +versions: ["latest"] env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: diff --git a/pr-checks/checks/cpp-deptrace-enabled.yml b/pr-checks/checks/cpp-deptrace-enabled.yml index a857af855f..8da46e66b5 100644 --- a/pr-checks/checks/cpp-deptrace-enabled.yml +++ b/pr-checks/checks/cpp-deptrace-enabled.yml @@ -1,6 +1,7 @@ name: "Cpp: enabling autoinstalling dependencies" description: "Checks that running C/C++ autobuild with autoinstalling dependencies works" operatingSystems: ["ubuntu", "macos"] +versions: ["latest"] env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: From 959337a156313be9107108888c58454ef37fdf9e Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Tue, 24 Oct 2023 11:10:13 +0200 Subject: [PATCH 3/6] C++: fix autobuild pr-checks for macOS --- .github/workflows/__cpp-deptrace-disabled.yml | 2 - .../__cpp-deptrace-enabled-on-macos.yml | 76 +++++++++++++++++++ .github/workflows/__cpp-deptrace-enabled.yml | 2 - pr-checks/checks/cpp-deptrace-disabled.yml | 2 +- .../checks/cpp-deptrace-enabled-on-macos.yml | 28 +++++++ pr-checks/checks/cpp-deptrace-enabled.yml | 2 +- 6 files changed, 106 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/__cpp-deptrace-enabled-on-macos.yml create mode 100644 pr-checks/checks/cpp-deptrace-enabled-on-macos.yml diff --git a/.github/workflows/__cpp-deptrace-disabled.yml b/.github/workflows/__cpp-deptrace-disabled.yml index 6bf59b5b4f..862010bbc8 100644 --- a/.github/workflows/__cpp-deptrace-disabled.yml +++ b/.github/workflows/__cpp-deptrace-disabled.yml @@ -27,8 +27,6 @@ jobs: include: - os: ubuntu-latest version: latest - - os: macos-latest - version: latest name: 'Cpp: disabling autoinstalling dependencies' permissions: contents: read diff --git a/.github/workflows/__cpp-deptrace-enabled-on-macos.yml b/.github/workflows/__cpp-deptrace-enabled-on-macos.yml new file mode 100644 index 0000000000..e9d05a43df --- /dev/null +++ b/.github/workflows/__cpp-deptrace-enabled-on-macos.yml @@ -0,0 +1,76 @@ +# Warning: This file is generated automatically, and should not be modified. +# Instead, please modify the template in the pr-checks directory and run: +# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py) +# to regenerate this file. + +name: 'PR Check - Cpp: disabling autoinstalling dependencies' +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GO111MODULE: auto + CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true' +on: + push: + branches: + - main + - releases/v2 + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + workflow_dispatch: {} +jobs: + cpp-deptrace-enabled-on-macos: + strategy: + matrix: + include: + - os: macos-latest + version: latest + name: 'Cpp: disabling autoinstalling dependencies' + permissions: + contents: read + security-events: write + 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 + - name: Test setup + shell: bash + run: | + cp -a ../action/tests/cpp-autobuild autobuild-dir + - uses: ./../action/init + with: + languages: cpp + tools: ${{ steps.prepare-test.outputs.tools-url }} + - uses: ./../action/autobuild + with: + working-directory: autobuild-dir + env: + CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true + - shell: bash + run: | + if ! ls /usr/bin/errno; then + echo "As expected, CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES is a no-op on macOS" + else + echo "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES should not have had any effect on macOS" + exit 1 + fi + env: + DOTNET_GENERATE_ASPNET_CERTIFICATE: 'false' + CODEQL_ACTION_TEST_MODE: true diff --git a/.github/workflows/__cpp-deptrace-enabled.yml b/.github/workflows/__cpp-deptrace-enabled.yml index 2d964f7311..9f4affdb97 100644 --- a/.github/workflows/__cpp-deptrace-enabled.yml +++ b/.github/workflows/__cpp-deptrace-enabled.yml @@ -27,8 +27,6 @@ jobs: include: - os: ubuntu-latest version: latest - - os: macos-latest - version: latest name: 'Cpp: enabling autoinstalling dependencies' permissions: contents: read diff --git a/pr-checks/checks/cpp-deptrace-disabled.yml b/pr-checks/checks/cpp-deptrace-disabled.yml index c904ef6a6e..30e6baecb7 100644 --- a/pr-checks/checks/cpp-deptrace-disabled.yml +++ b/pr-checks/checks/cpp-deptrace-disabled.yml @@ -1,6 +1,6 @@ name: "Cpp: disabling autoinstalling dependencies" description: "Checks that running C/C++ autobuild with autoinstalling dependencies explicitly disabled works" -operatingSystems: ["ubuntu", "macos"] +operatingSystems: ["ubuntu"] versions: ["latest"] env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" diff --git a/pr-checks/checks/cpp-deptrace-enabled-on-macos.yml b/pr-checks/checks/cpp-deptrace-enabled-on-macos.yml new file mode 100644 index 0000000000..769e095b2c --- /dev/null +++ b/pr-checks/checks/cpp-deptrace-enabled-on-macos.yml @@ -0,0 +1,28 @@ +name: "Cpp: disabling autoinstalling dependencies" +description: "Checks that running C/C++ autobuild with autoinstalling dependencies explicitly disabled works" +operatingSystems: ["macos"] +versions: ["latest"] +env: + DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" +steps: + - name: Test setup + shell: bash + run: | + cp -a ../action/tests/cpp-autobuild autobuild-dir + - uses: ./../action/init + with: + languages: cpp + tools: ${{ steps.prepare-test.outputs.tools-url }} + - uses: ./../action/autobuild + with: + working-directory: autobuild-dir + env: + CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true + - shell: bash + run: | + if ! ls /usr/bin/errno; then + echo "As expected, CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES is a no-op on macOS" + else + echo "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES should not have had any effect on macOS" + exit 1 + fi diff --git a/pr-checks/checks/cpp-deptrace-enabled.yml b/pr-checks/checks/cpp-deptrace-enabled.yml index 8da46e66b5..0a1999112b 100644 --- a/pr-checks/checks/cpp-deptrace-enabled.yml +++ b/pr-checks/checks/cpp-deptrace-enabled.yml @@ -1,6 +1,6 @@ name: "Cpp: enabling autoinstalling dependencies" description: "Checks that running C/C++ autobuild with autoinstalling dependencies works" -operatingSystems: ["ubuntu", "macos"] +operatingSystems: ["ubuntu"] versions: ["latest"] env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" From 838be48ce098ebb00ed7c02334b45131fed3adca Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Tue, 24 Oct 2023 11:31:04 +0200 Subject: [PATCH 4/6] C++: tweak deptrace checks --- .github/workflows/__cpp-deptrace-disabled.yml | 4 ++++ .github/workflows/__cpp-deptrace-enabled-on-macos.yml | 2 +- .github/workflows/__cpp-deptrace-enabled.yml | 4 ++++ pr-checks/checks/cpp-deptrace-disabled.yml | 2 +- pr-checks/checks/cpp-deptrace-enabled-on-macos.yml | 2 +- pr-checks/checks/cpp-deptrace-enabled.yml | 2 +- 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/__cpp-deptrace-disabled.yml b/.github/workflows/__cpp-deptrace-disabled.yml index 862010bbc8..0a76d0ac71 100644 --- a/.github/workflows/__cpp-deptrace-disabled.yml +++ b/.github/workflows/__cpp-deptrace-disabled.yml @@ -27,6 +27,10 @@ jobs: include: - os: ubuntu-latest version: latest + - os: ubuntu-latest + version: default + - os: ubuntu-latest + version: nightly-latest name: 'Cpp: disabling autoinstalling dependencies' permissions: contents: read diff --git a/.github/workflows/__cpp-deptrace-enabled-on-macos.yml b/.github/workflows/__cpp-deptrace-enabled-on-macos.yml index e9d05a43df..aea1411d87 100644 --- a/.github/workflows/__cpp-deptrace-enabled-on-macos.yml +++ b/.github/workflows/__cpp-deptrace-enabled-on-macos.yml @@ -26,7 +26,7 @@ jobs: matrix: include: - os: macos-latest - version: latest + version: nightly-latest name: 'Cpp: disabling autoinstalling dependencies' permissions: contents: read diff --git a/.github/workflows/__cpp-deptrace-enabled.yml b/.github/workflows/__cpp-deptrace-enabled.yml index 9f4affdb97..110a9a1bc2 100644 --- a/.github/workflows/__cpp-deptrace-enabled.yml +++ b/.github/workflows/__cpp-deptrace-enabled.yml @@ -27,6 +27,10 @@ jobs: include: - os: ubuntu-latest version: latest + - os: ubuntu-latest + version: default + - os: ubuntu-latest + version: nightly-latest name: 'Cpp: enabling autoinstalling dependencies' permissions: contents: read diff --git a/pr-checks/checks/cpp-deptrace-disabled.yml b/pr-checks/checks/cpp-deptrace-disabled.yml index 30e6baecb7..f7ac8b377c 100644 --- a/pr-checks/checks/cpp-deptrace-disabled.yml +++ b/pr-checks/checks/cpp-deptrace-disabled.yml @@ -1,7 +1,7 @@ name: "Cpp: disabling autoinstalling dependencies" description: "Checks that running C/C++ autobuild with autoinstalling dependencies explicitly disabled works" operatingSystems: ["ubuntu"] -versions: ["latest"] +versions: ["latest", "default", "nightly-latest"] # This feature is not compatible with old CLIs env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: diff --git a/pr-checks/checks/cpp-deptrace-enabled-on-macos.yml b/pr-checks/checks/cpp-deptrace-enabled-on-macos.yml index 769e095b2c..9a1f151852 100644 --- a/pr-checks/checks/cpp-deptrace-enabled-on-macos.yml +++ b/pr-checks/checks/cpp-deptrace-enabled-on-macos.yml @@ -1,7 +1,7 @@ name: "Cpp: disabling autoinstalling dependencies" description: "Checks that running C/C++ autobuild with autoinstalling dependencies explicitly disabled works" operatingSystems: ["macos"] -versions: ["latest"] +versions: ["nightly-latest"] # This is not released yet, will come with 2.15.2 env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: diff --git a/pr-checks/checks/cpp-deptrace-enabled.yml b/pr-checks/checks/cpp-deptrace-enabled.yml index 0a1999112b..386444739a 100644 --- a/pr-checks/checks/cpp-deptrace-enabled.yml +++ b/pr-checks/checks/cpp-deptrace-enabled.yml @@ -1,7 +1,7 @@ name: "Cpp: enabling autoinstalling dependencies" description: "Checks that running C/C++ autobuild with autoinstalling dependencies works" operatingSystems: ["ubuntu"] -versions: ["latest"] +versions: ["latest", "default", "nightly-latest"] # This feature is not compatible with old CLIs env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: From e3f5f833da76bc719e37eb61346f34f6a134b72a Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Wed, 25 Oct 2023 12:23:32 +0200 Subject: [PATCH 5/6] Apply suggestions from code review Co-authored-by: Henry Mercer --- pr-checks/checks/cpp-deptrace-disabled.yml | 6 +++--- pr-checks/checks/cpp-deptrace-enabled-on-macos.yml | 4 ++-- pr-checks/checks/cpp-deptrace-enabled.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pr-checks/checks/cpp-deptrace-disabled.yml b/pr-checks/checks/cpp-deptrace-disabled.yml index f7ac8b377c..118d01ae1c 100644 --- a/pr-checks/checks/cpp-deptrace-disabled.yml +++ b/pr-checks/checks/cpp-deptrace-disabled.yml @@ -1,7 +1,7 @@ -name: "Cpp: disabling autoinstalling dependencies" +name: "C/C++: disabling autoinstalling dependencies (Linux)" description: "Checks that running C/C++ autobuild with autoinstalling dependencies explicitly disabled works" operatingSystems: ["ubuntu"] -versions: ["latest", "default", "nightly-latest"] # This feature is not compatible with old CLIs +versions: ["latest", "default", "nightly-latest"] # This feature is not compatible with CLIs < 2.15.0 env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: @@ -21,6 +21,6 @@ steps: - shell: bash run: | if ls /usr/bin/errno; then - echo "Did autoinstall errno, and it should not have" + echo "C/C++ autobuild installed errno, but it should not have since auto-install dependencies is disabled." exit 1 fi diff --git a/pr-checks/checks/cpp-deptrace-enabled-on-macos.yml b/pr-checks/checks/cpp-deptrace-enabled-on-macos.yml index 9a1f151852..8a70f82fa5 100644 --- a/pr-checks/checks/cpp-deptrace-enabled-on-macos.yml +++ b/pr-checks/checks/cpp-deptrace-enabled-on-macos.yml @@ -1,5 +1,5 @@ -name: "Cpp: disabling autoinstalling dependencies" -description: "Checks that running C/C++ autobuild with autoinstalling dependencies explicitly disabled works" +name: "C/C++: autoinstalling dependencies is skipped (macOS)" +description: "Checks that running C/C++ autobuild with autoinstalling dependencies explicitly enabled is a no-op on macOS" operatingSystems: ["macos"] versions: ["nightly-latest"] # This is not released yet, will come with 2.15.2 env: diff --git a/pr-checks/checks/cpp-deptrace-enabled.yml b/pr-checks/checks/cpp-deptrace-enabled.yml index 386444739a..b3f7b1b733 100644 --- a/pr-checks/checks/cpp-deptrace-enabled.yml +++ b/pr-checks/checks/cpp-deptrace-enabled.yml @@ -1,7 +1,7 @@ -name: "Cpp: enabling autoinstalling dependencies" +name: "C/C++: autoinstalling dependencies (Linux)" description: "Checks that running C/C++ autobuild with autoinstalling dependencies works" operatingSystems: ["ubuntu"] -versions: ["latest", "default", "nightly-latest"] # This feature is not compatible with old CLIs +versions: ["latest", "default", "nightly-latest"] # This feature is not compatible with CLIs < 2.15.0 env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: From f1b64d85e48f17cff7b08f21dae454c1e1f08615 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Wed, 25 Oct 2023 13:34:17 +0200 Subject: [PATCH 6/6] Sync PR checks --- .github/workflows/__cpp-deptrace-disabled.yml | 6 +++--- .github/workflows/__cpp-deptrace-enabled-on-macos.yml | 4 ++-- .github/workflows/__cpp-deptrace-enabled.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/__cpp-deptrace-disabled.yml b/.github/workflows/__cpp-deptrace-disabled.yml index 0a76d0ac71..cf6dced2be 100644 --- a/.github/workflows/__cpp-deptrace-disabled.yml +++ b/.github/workflows/__cpp-deptrace-disabled.yml @@ -3,7 +3,7 @@ # (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py) # to regenerate this file. -name: 'PR Check - Cpp: disabling autoinstalling dependencies' +name: 'PR Check - C/C++: disabling autoinstalling dependencies (Linux)' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GO111MODULE: auto @@ -31,7 +31,7 @@ jobs: version: default - os: ubuntu-latest version: nightly-latest - name: 'Cpp: disabling autoinstalling dependencies' + name: 'C/C++: disabling autoinstalling dependencies (Linux)' permissions: contents: read security-events: write @@ -70,7 +70,7 @@ jobs: - shell: bash run: | if ls /usr/bin/errno; then - echo "Did autoinstall errno, and it should not have" + echo "C/C++ autobuild installed errno, but it should not have since auto-install dependencies is disabled." exit 1 fi env: diff --git a/.github/workflows/__cpp-deptrace-enabled-on-macos.yml b/.github/workflows/__cpp-deptrace-enabled-on-macos.yml index aea1411d87..97ab748d83 100644 --- a/.github/workflows/__cpp-deptrace-enabled-on-macos.yml +++ b/.github/workflows/__cpp-deptrace-enabled-on-macos.yml @@ -3,7 +3,7 @@ # (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py) # to regenerate this file. -name: 'PR Check - Cpp: disabling autoinstalling dependencies' +name: 'PR Check - C/C++: autoinstalling dependencies is skipped (macOS)' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GO111MODULE: auto @@ -27,7 +27,7 @@ jobs: include: - os: macos-latest version: nightly-latest - name: 'Cpp: disabling autoinstalling dependencies' + name: 'C/C++: autoinstalling dependencies is skipped (macOS)' permissions: contents: read security-events: write diff --git a/.github/workflows/__cpp-deptrace-enabled.yml b/.github/workflows/__cpp-deptrace-enabled.yml index 110a9a1bc2..375d1b0bfb 100644 --- a/.github/workflows/__cpp-deptrace-enabled.yml +++ b/.github/workflows/__cpp-deptrace-enabled.yml @@ -3,7 +3,7 @@ # (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py) # to regenerate this file. -name: 'PR Check - Cpp: enabling autoinstalling dependencies' +name: 'PR Check - C/C++: autoinstalling dependencies (Linux)' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GO111MODULE: auto @@ -31,7 +31,7 @@ jobs: version: default - os: ubuntu-latest version: nightly-latest - name: 'Cpp: enabling autoinstalling dependencies' + name: 'C/C++: autoinstalling dependencies (Linux)' permissions: contents: read security-events: write