-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add msvc response file integration test
Builds against windows and performs a series of compilation checks to ensure that the mock project builds and response files are properly expanded
- Loading branch information
1 parent
0749f40
commit c165b3b
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -340,3 +340,61 @@ jobs: | |
${SCCACHE_PATH} --show-stats | ||
${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]" | ||
test-mock-msvc: | ||
runs-on: windows-2019 | ||
env: | ||
TARGET: x86_64-pc-windows-msvc | ||
SCCACHE_EXE: ${{ github.workspace }}\\target\\x86_64-pc-windows-msvc\\debug\\sccache.exe | ||
SCCACHE_LOG: "trace" | ||
SCCACHE_ERROR_LOG: "${{ github.workspace }}\\server_log.txt" | ||
|
||
steps: | ||
- uses: ilammy/[email protected] | ||
|
||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install rust | ||
uses: ./.github/actions/rust-toolchain | ||
with: | ||
toolchain: "stable" | ||
target: $TARGET | ||
|
||
- name: Build | ||
run: cargo build --bin sccache --target $env:TARGET --features=openssl/vendored | ||
|
||
- name: Compile MSVC (no cache) | ||
shell: bash | ||
working-directory: ./tests/msvc | ||
run: cl "@args.rsp" | ||
|
||
- name: Start Server | ||
shell: bash | ||
run: $SCCACHE_EXE --start-server | ||
|
||
- name: Compile - Cache Miss | ||
shell: bash | ||
working-directory: ./tests/msvc | ||
run: | | ||
$SCCACHE_EXE "$(where cl.exe)" -c "@args.rsp" | ||
$SCCACHE_EXE --show-stats | ||
$SCCACHE_EXE --show-stats | grep -e "Cache misses\s*[1-9]" | ||
- name: Compile - Cache Hit | ||
shell: bash | ||
working-directory: ./tests/msvc | ||
run: | | ||
$SCCACHE_EXE "$(where cl.exe)" -c "@args.rsp" | ||
$SCCACHE_EXE --show-stats | ||
$SCCACHE_EXE --show-stats | grep -e "Cache hits\s*[1-9]" | ||
- name: Stop Server | ||
if: success() || failure() | ||
shell: bash | ||
run: $SCCACHE_EXE --stop-server | ||
|
||
- name: Show Server Log | ||
if: success() || failure() | ||
shell: bash | ||
run: cat "$SCCACHE_ERROR_LOG" |
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
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 @@ | ||
foo.cpp -Fofoo.o |
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,6 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
std::cout << "Hello World!\n"; | ||
return 0; | ||
} |