-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #103471 - JohnTitor:rollup-tfmy6ab, r=JohnTitor
Rollup of 7 pull requests Successful merges: - #99578 (Remove redundant lifetime bound from `impl Borrow for Cow`) - #99939 (Sort tests at compile time, not at startup) - #102271 (Stabilize `duration_checked_float`) - #102766 (Don't link to `libresolv` in libstd on Darwin) - #103277 (Update libstd's libc to 0.2.135 (to make `libstd` no longer pull in `libiconv.dylib` on Darwin)) - #103437 (Sync rustc_codegen_cranelift) - #103466 (Fix grammar in docs for std::io::Read) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
66 changed files
with
1,199 additions
and
731 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
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
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 |
---|---|---|
|
@@ -29,7 +29,11 @@ jobs: | |
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
env: | ||
TARGET_TRIPLE: x86_64-unknown-linux-gnu | ||
- os: macos-latest | ||
env: | ||
TARGET_TRIPLE: x86_64-apple-darwin | ||
# cross-compile from Linux to Windows using mingw | ||
- os: ubuntu-latest | ||
env: | ||
|
@@ -112,7 +116,7 @@ jobs: | |
if: matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: cg_clif-${{ runner.os }} | ||
name: cg_clif-${{ matrix.env.TARGET_TRIPLE }} | ||
path: cg_clif.tar.xz | ||
|
||
- name: Upload prebuilt cg_clif (cross compile) | ||
|
@@ -122,56 +126,89 @@ jobs: | |
name: cg_clif-${{ runner.os }}-cross-x86_64-mingw | ||
path: cg_clif.tar.xz | ||
|
||
build_windows: | ||
runs-on: windows-latest | ||
windows: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 60 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# Native Windows build with MSVC | ||
- os: windows-latest | ||
env: | ||
TARGET_TRIPLE: x86_64-pc-windows-msvc | ||
# cross-compile from Windows to Windows MinGW | ||
- os: windows-latest | ||
env: | ||
TARGET_TRIPLE: x86_64-pc-windows-gnu | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
#- name: Cache cargo installed crates | ||
# uses: actions/cache@v2 | ||
# with: | ||
# path: ~/.cargo/bin | ||
# key: ${{ runner.os }}-cargo-installed-crates | ||
|
||
#- name: Cache cargo registry and index | ||
# uses: actions/cache@v2 | ||
# with: | ||
# path: | | ||
# ~/.cargo/registry | ||
# ~/.cargo/git | ||
# key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
#- name: Cache cargo target dir | ||
# uses: actions/cache@v2 | ||
# with: | ||
# path: target | ||
# key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }} | ||
- name: Cache cargo installed crates | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cargo/bin | ||
key: ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-installed-crates | ||
|
||
- name: Cache cargo registry and index | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
key: ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Cache cargo target dir | ||
uses: actions/cache@v2 | ||
with: | ||
path: target | ||
key: ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }} | ||
|
||
- name: Set MinGW as the default toolchain | ||
if: matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu' | ||
run: rustup set default-host x86_64-pc-windows-gnu | ||
|
||
- name: Prepare dependencies | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "User" | ||
git config --global core.autocrlf false | ||
rustup set default-host x86_64-pc-windows-gnu | ||
rustc y.rs -o y.exe -g | ||
./y.exe prepare | ||
- name: Build without unstable features | ||
env: | ||
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }} | ||
# This is the config rust-lang/rust uses for builds | ||
run: ./y.rs build --no-unstable-features | ||
|
||
- name: Build | ||
#name: Test | ||
run: ./y.rs build --sysroot none | ||
|
||
- name: Test | ||
run: | | ||
# Enable backtraces for easier debugging | ||
#$Env:RUST_BACKTRACE=1 | ||
$Env:RUST_BACKTRACE=1 | ||
# Reduce amount of benchmark runs as they are slow | ||
#$Env:COMPILE_RUNS=2 | ||
#$Env:RUN_RUNS=2 | ||
$Env:COMPILE_RUNS=2 | ||
$Env:RUN_RUNS=2 | ||
# Enable extra checks | ||
#$Env:CG_CLIF_ENABLE_VERIFIER=1 | ||
./y.exe build | ||
$Env:CG_CLIF_ENABLE_VERIFIER=1 | ||
# WIP Disable some tests | ||
# This fails due to some weird argument handling by hyperfine, not an actual regression | ||
# more of a build system issue | ||
(Get-Content config.txt) -replace '(bench.simple-raytracer)', '# $1' | Out-File config.txt | ||
# This fails with a different output than expected | ||
(Get-Content config.txt) -replace '(test.regex-shootout-regex-dna)', '# $1' | Out-File config.txt | ||
./y.exe test | ||
- name: Package prebuilt cg_clif | ||
# don't use compression as xzip isn't supported by tar on windows and bzip2 hangs | ||
|
@@ -180,5 +217,5 @@ jobs: | |
- name: Upload prebuilt cg_clif | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: cg_clif-${{ runner.os }} | ||
name: cg_clif-${{ matrix.env.TARGET_TRIPLE }} | ||
path: cg_clif.tar |
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
Oops, something went wrong.