From b0f19660f015762aa1302f7a0fd31b8ee9c4a38a Mon Sep 17 00:00:00 2001 From: theKidOfArcrania Date: Wed, 15 May 2024 10:32:06 -0700 Subject: [PATCH 1/9] Add tests for UNC paths on windows builds --- .github/workflows/main.yml | 9 +++++++++ ci/run.sh | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 970a32ae5..011886366 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,6 +19,11 @@ jobs: - target: aarch64-unknown-linux-gnu os: ubuntu-latest rust: nightly + - target: aarch64-pc-windows-msvc + os: windows-latest + rust: nightly + test_unc: 1 + no_std: 1 - target: arm-unknown-linux-gnueabi os: ubuntu-latest rust: nightly @@ -78,6 +83,7 @@ jobs: - target: i686-pc-windows-msvc os: windows-latest rust: nightly + test_unc: 1 - target: x86_64-pc-windows-msvc os: windows-latest rust: nightly @@ -109,6 +115,9 @@ jobs: - run: ./ci/run.sh ${{ matrix.target }} if: matrix.os != 'ubuntu-latest' shell: bash + env: + NO_STD: ${{ matrix.no_std }} + TEST_UNC: ${{ matrix.test_unc }} # Otherwise we use our docker containers to run builds - run: cargo generate-lockfile && ./ci/run-docker.sh ${{ matrix.target }} diff --git a/ci/run.sh b/ci/run.sh index 847b52435..f05744e87 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -32,6 +32,18 @@ else $run --features no-f16-f128 --release fi +if [ "${TEST_UNC:-}" = "1" ]; then + run="cargo build --manifest-path testcrate/Cargo.toml --target $target --target-dir \"\\\\?\\$(pwd)\"" + $run + $run --release + $run --features c + $run --features c --release + $run --features no-asm + $run --features no-asm --release + $run --features no-f16-f128 + $run --features no-f16-f128 --release +fi + if [ -d /builtins-target ]; then rlib_paths=/builtins-target/"${target}"/debug/deps/libcompiler_builtins-*.rlib else From 853263a9582fb989c02a5d96092bcf91c90734af Mon Sep 17 00:00:00 2001 From: theKidOfArcrania Date: Wed, 15 May 2024 10:40:48 -0700 Subject: [PATCH 2/9] Fix CI --- .github/workflows/main.yml | 1 + ci/run.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 011886366..6518a4dd6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -87,6 +87,7 @@ jobs: - target: x86_64-pc-windows-msvc os: windows-latest rust: nightly + test_unc: 1 - target: i686-pc-windows-gnu os: windows-latest rust: nightly-i686-gnu diff --git a/ci/run.sh b/ci/run.sh index f05744e87..b2728eacf 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -33,7 +33,7 @@ else fi if [ "${TEST_UNC:-}" = "1" ]; then - run="cargo build --manifest-path testcrate/Cargo.toml --target $target --target-dir \"\\\\?\\$(pwd)\"" + run="cargo build --manifest-path testcrate/Cargo.toml --target $target --target-dir \\\\?\\$TEMP\\test_unc" $run $run --release $run --features c From 04c486666b623985c7097f6022708ae42c970caf Mon Sep 17 00:00:00 2001 From: theKidOfArcrania Date: Wed, 15 May 2024 10:44:58 -0700 Subject: [PATCH 3/9] Use cmd.exe --- .github/workflows/main.yml | 2 ++ ci/run.sh | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6518a4dd6..531a4c308 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -91,9 +91,11 @@ jobs: - target: i686-pc-windows-gnu os: windows-latest rust: nightly-i686-gnu + test_unc: 1 - target: x86_64-pc-windows-gnu os: windows-latest rust: nightly-x86_64-gnu + test_unc: 1 steps: - name: Print runner information run: uname -a diff --git a/ci/run.sh b/ci/run.sh index b2728eacf..2620dfff8 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -33,15 +33,17 @@ else fi if [ "${TEST_UNC:-}" = "1" ]; then - run="cargo build --manifest-path testcrate/Cargo.toml --target $target --target-dir \\\\?\\$TEMP\\test_unc" - $run - $run --release - $run --features c - $run --features c --release - $run --features no-asm - $run --features no-asm --release - $run --features no-f16-f128 - $run --features no-f16-f128 --release + function run() { + cmd.exe /c cargo build --manifest-path testcrate/Cargo.toml --target $target --target-dir "\\\\?\\%TEMP%\\test_unc" "$@" + } + run + run --release + run --features c + run --features c --release + run --features no-asm + run --features no-asm --release + run --features no-f16-f128 + run --features no-f16-f128 --release fi if [ -d /builtins-target ]; then From 73175bd0b379b5a9853100b0546a68507b840845 Mon Sep 17 00:00:00 2001 From: theKidOfArcrania Date: Wed, 15 May 2024 10:47:07 -0700 Subject: [PATCH 4/9] Fix backslash --- ci/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run.sh b/ci/run.sh index 2620dfff8..d4f0b80fb 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -34,7 +34,7 @@ fi if [ "${TEST_UNC:-}" = "1" ]; then function run() { - cmd.exe /c cargo build --manifest-path testcrate/Cargo.toml --target $target --target-dir "\\\\?\\%TEMP%\\test_unc" "$@" + cmd.exe /c cargo build --manifest-path "testcrate\\Cargo.toml" --target $target --target-dir "\\\\?\\%TEMP%\\test_unc" "$@" } run run --release From b8b09d5b1293313a0a2747e4e47889add9891712 Mon Sep 17 00:00:00 2001 From: theKidOfArcrania Date: Wed, 15 May 2024 10:54:40 -0700 Subject: [PATCH 5/9] Instead have cmd.exe dump out path --- ci/run.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/ci/run.sh b/ci/run.sh index d4f0b80fb..b4bf18b10 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -33,17 +33,16 @@ else fi if [ "${TEST_UNC:-}" = "1" ]; then - function run() { - cmd.exe /c cargo build --manifest-path "testcrate\\Cargo.toml" --target $target --target-dir "\\\\?\\%TEMP%\\test_unc" "$@" - } - run - run --release - run --features c - run --features c --release - run --features no-asm - run --features no-asm --release - run --features no-f16-f128 - run --features no-f16-f128 --release + path=$(cmd.exe "/C echo \\\\?\\%cd%\\testcrate\\target_unc") + run="cargo test --manifest-path testcrate/Cargo.toml --target $target --target-dir $path" + $run + $run --release + $run --features c + $run --features c --release + $run --features no-asm + $run --features no-asm --release + $run --features no-f16-f128 + $run --features no-f16-f128 --release fi if [ -d /builtins-target ]; then From ac30f02ab7d36f270b09244457b2c31449368aef Mon Sep 17 00:00:00 2001 From: theKidOfArcrania Date: Wed, 15 May 2024 11:05:20 -0700 Subject: [PATCH 6/9] Properly escape /C and fix naming --- .github/workflows/main.yml | 12 ++++++------ ci/run.sh | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 531a4c308..b27267ba6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: - target: aarch64-pc-windows-msvc os: windows-latest rust: nightly - test_unc: 1 + test_verbatim: 1 no_std: 1 - target: arm-unknown-linux-gnueabi os: ubuntu-latest @@ -83,19 +83,19 @@ jobs: - target: i686-pc-windows-msvc os: windows-latest rust: nightly - test_unc: 1 + test_verbatim: 1 - target: x86_64-pc-windows-msvc os: windows-latest rust: nightly - test_unc: 1 + test_verbatim: 1 - target: i686-pc-windows-gnu os: windows-latest rust: nightly-i686-gnu - test_unc: 1 + test_verbatim: 1 - target: x86_64-pc-windows-gnu os: windows-latest rust: nightly-x86_64-gnu - test_unc: 1 + test_verbatim: 1 steps: - name: Print runner information run: uname -a @@ -120,7 +120,7 @@ jobs: shell: bash env: NO_STD: ${{ matrix.no_std }} - TEST_UNC: ${{ matrix.test_unc }} + TEST_VERBATIM: ${{ matrix.test_verbatim }} # Otherwise we use our docker containers to run builds - run: cargo generate-lockfile && ./ci/run-docker.sh ${{ matrix.target }} diff --git a/ci/run.sh b/ci/run.sh index b4bf18b10..cc07090d4 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -32,9 +32,9 @@ else $run --features no-f16-f128 --release fi -if [ "${TEST_UNC:-}" = "1" ]; then - path=$(cmd.exe "/C echo \\\\?\\%cd%\\testcrate\\target_unc") - run="cargo test --manifest-path testcrate/Cargo.toml --target $target --target-dir $path" +if [ "${TEST_VERBATIM:-}" = "1" ]; then + verb_path=$(cmd.exe //C echo \\\\?\\%cd%\\testcrate\\target2) + run="cargo test --manifest-path testcrate/Cargo.toml --target $target --target-dir $verb_path" $run $run --release $run --features c From e6ff35e46dc7bec485fa7f44e46c27a4980ed8fc Mon Sep 17 00:00:00 2001 From: theKidOfArcrania Date: Wed, 15 May 2024 11:07:06 -0700 Subject: [PATCH 7/9] verbatim tests only need to build --- ci/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run.sh b/ci/run.sh index cc07090d4..3c33bbf83 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -34,7 +34,7 @@ fi if [ "${TEST_VERBATIM:-}" = "1" ]; then verb_path=$(cmd.exe //C echo \\\\?\\%cd%\\testcrate\\target2) - run="cargo test --manifest-path testcrate/Cargo.toml --target $target --target-dir $verb_path" + run="cargo build --manifest-path testcrate/Cargo.toml --target $target --target-dir $verb_path" $run $run --release $run --features c From 8fda43490571f1482c31a42b808ddeb89dd3d177 Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Fri, 17 May 2024 08:40:39 -0700 Subject: [PATCH 8/9] Only run `--features c` for verbatim test --- ci/run.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/ci/run.sh b/ci/run.sh index 3c33bbf83..2512dc633 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -34,15 +34,7 @@ fi if [ "${TEST_VERBATIM:-}" = "1" ]; then verb_path=$(cmd.exe //C echo \\\\?\\%cd%\\testcrate\\target2) - run="cargo build --manifest-path testcrate/Cargo.toml --target $target --target-dir $verb_path" - $run - $run --release - $run --features c - $run --features c --release - $run --features no-asm - $run --features no-asm --release - $run --features no-f16-f128 - $run --features no-f16-f128 --release + cargo build --manifest-path testcrate/Cargo.toml --target $target --target-dir $verb_path --features c fi if [ -d /builtins-target ]; then From 12795d27d16a7a52f3a62a0ef5cd71c66d07e100 Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Fri, 17 May 2024 08:41:59 -0700 Subject: [PATCH 9/9] Don't run verbatim test on windows-gnu --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b27267ba6..72d441c4e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -91,11 +91,9 @@ jobs: - target: i686-pc-windows-gnu os: windows-latest rust: nightly-i686-gnu - test_verbatim: 1 - target: x86_64-pc-windows-gnu os: windows-latest rust: nightly-x86_64-gnu - test_verbatim: 1 steps: - name: Print runner information run: uname -a