-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1964 from github/redsun82/cpp-deptrace-pr-checks
C++: add deptrace pr-checks
- Loading branch information
Showing
8 changed files
with
325 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
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 CLIs < 2.15.0 | ||
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 "C/C++ autobuild installed errno, but it should not have since auto-install dependencies is disabled." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
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: | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
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 CLIs < 2.15.0 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
errno || true # just a command to check its autoinstallation by deptrace | ||
|
||
gcc -o main main.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include "stdio.h" | ||
|
||
int main(int argc, char **argv) { | ||
if (1) { | ||
printf("Hello, World!\n"); | ||
} | ||
} | ||
|