Skip to content

Commit

Permalink
fix: explicitly select nightly toolchain for building without rust-to…
Browse files Browse the repository at this point in the history
…olchain.toml

Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Mar 27, 2024
1 parent ff17a1a commit 3e83c65
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ jobs:
sudo apt-get update
sudo apt-get install uftrace
- uses: mkroening/rust-toolchain-toml@main
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-01
components: llvm-tools
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
Expand Down Expand Up @@ -62,15 +58,11 @@ jobs:
sudo apt-get update
sudo apt-get install uftrace
- uses: mkroening/rust-toolchain-toml@main
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-01
components: llvm-tools
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Build
run: cargo +nightly-2024-01-01 rustc -- -Zinstrument-mcount -C passes="ee-instrument<post-inline>"
run: cargo +nightly rustc -- -Zinstrument-mcount -C passes="ee-instrument<post-inline>"
- name: Run
run: |
mkdir tracedir
Expand Down
4 changes: 2 additions & 2 deletions examples/c/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ default: out/debug/librftrace.a out/debug/librftrace_frontend_ffi.a
gcc main.c -p -pthread -ldl -lrftrace -lrftrace_frontend_ffi -Lout/debug/ -o test

out/debug/librftrace.a:
cargo +nightly-2024-01-01 build --manifest-path ../../rftrace/Cargo.toml --target-dir out
cargo +nightly build --manifest-path ../../rftrace/Cargo.toml --target-dir out

out/debug/librftrace_frontend_ffi.a:
cargo +nightly-2024-01-01 build --manifest-path ../../rftrace-frontend-ffi/Cargo.toml --target-dir out
cargo +nightly build --manifest-path ../../rftrace-frontend-ffi/Cargo.toml --target-dir out

clean:
rm -r out
Expand Down
1 change: 1 addition & 0 deletions rftrace/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fn build_backend() {
let target = "x86_64-unknown-none";

let mut cmd = cargo();
cmd.arg("+nightly");
cmd.arg("rustc");

cmd.args(&["--target", target]);
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2024-01-01"
channel = "nightly"
components = [
"rust-src",
"llvm-tools-preview",
Expand Down

0 comments on commit 3e83c65

Please sign in to comment.