Skip to content

Commit

Permalink
rust-toolchain to rust-toolchain.toml (#1689)
Browse files Browse the repository at this point in the history
* rust-toolchain to rust-toolchain\.toml

* workflows rust-toolchain -> rust-toolchain.toml

* fix workflows

* fix target

* install rust

---------

Co-authored-by: Dakota Brink <[email protected]>
  • Loading branch information
insipx and codabrink authored Mar 3, 2025
1 parent 2760b32 commit 95fc87f
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 28 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/cargo-deny-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
- main
pull_request:
workflow_dispatch:

jobs:
cargo-deny:
runs-on: warp-ubuntu-latest-x64-16x
Expand All @@ -16,12 +15,21 @@ jobs:
- bans
- licenses
- sources

steps:
- uses: actions/checkout@v4
# Install Rust toolchain
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

# Run cargo-deny with the installed toolchain
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check ${{ matrix.checks }}
rust-version: stable # Use the stable toolchain we just installed

# Prevent sudden announcement of a new advisory from failing CI
continue-on-error: ${{ matrix.checks == 'advisories' }}
continue-on-error: ${{ matrix.checks == 'advisories' }}
2 changes: 1 addition & 1 deletion .github/workflows/check-ios-android-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- "Cargo.toml"
- "Cargo.lock"
- "dev/**"
- "rust-toolchain"
- "rust-toolchain.toml"
- ".cargo/**"
jobs:
check-swift:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-node-bindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "Cargo.toml"
- "Cargo.lock"
- ".cargo/**"
- "rust-toolchain"
- "rust-toolchain.toml"
jobs:
lint:
name: Lint
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/lint-wasm-bindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "Cargo.toml"
- "Cargo.lock"
- ".cargo/**"
- "rust-toolchain"
- "rust-toolchain.toml"
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
Expand All @@ -22,7 +22,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Update rust toolchains
run: rustup update
run: |
rustup update
rustup target add wasm32-unknown-unknown
- name: Cache
uses: Swatinem/rust-cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
- "Cargo.toml"
- "Cargo.lock"
- ".cargo/**"
- "rust-toolchain"
- "rust-toolchain.toml"
- "rustfmt.toml"
env:
CARGO_TERM_COLOR: always
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/noop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
- "!.node-version"
- "!Cargo.toml"
- "!Cargo.lock"
- "!rust-toolchain"
- "!rust-toolchain.toml"
- "!rustfmt.toml"
# Test and Lint steps are required for pull requests, but some file changes
# don't require them to run. These jobs define the required steps for these
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-ffi-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
- "Cargo.toml"
- "Cargo.lock"
- ".cargo/**"
- "rust-toolchain"
- "rust-toolchain.toml"
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-http-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- "Cargo.toml"
- "Cargo.lock"
- ".cargo/**"
- "rust-toolchain"
- "rust-toolchain.toml"
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/test-node-bindings.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Test Node Bindings

on:
push:
branches:
- main

pull_request:
# only run tests when related changes are made
paths:
Expand All @@ -21,29 +19,24 @@ on:
- "Cargo.toml"
- "Cargo.lock"
- ".cargo/**"
- "rust-toolchain"

- "rust-toolchain.toml"
jobs:
test:
name: Test
runs-on: warp-ubuntu-latest-x64-16x
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Update rust toolchains
run: rustup update

- name: Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
bindings_node
- name: Start Docker containers
run: dev/up

- name: Setup node
uses: actions/setup-node@v4
with:
Expand All @@ -52,20 +45,16 @@ jobs:
cache: "yarn"
env:
SKIP_YARN_COREPACK_CHECK: "1"

- name: Enable corepack
run: corepack enable

- name: Install dependencies
working-directory: bindings_node
run: |
yarn
- name: Build release
working-directory: bindings_node
run: |
yarn build
- name: Run tests
working-directory: bindings_node
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-webassembly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- "Cargo.toml"
- "Cargo.lock"
- ".cargo/**"
- "rust-toolchain"
- "rust-toolchain.toml"
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- "Cargo.toml"
- "Cargo.lock"
- ".cargo/**"
- "rust-toolchain"
- "rust-toolchain.toml"
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
Expand Down
2 changes: 1 addition & 1 deletion nix/libxmtp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ let
});

rust-toolchain = fenix.fromToolchainFile {
file = ./../rust-toolchain;
file = ./../rust-toolchain.toml;
sha256 = "sha256-AJ6LX/Q/Er9kS15bn9iflkUwcgYqRQxiOIL2ToVAXaU=";
};
in
Expand Down
4 changes: 2 additions & 2 deletions rust-toolchain → rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[toolchain]
channel = "stable"
components = [ "rustc", "cargo", "clippy", "rustfmt", "rust-analyzer" ]
components = ["rustc", "cargo", "clippy", "rustfmt", "rust-analyzer"]
targets = [
"wasm32-unknown-unknown",
"x86_64-unknown-linux-gnu",
"x86_64-apple-ios",
"x86_64-apple-darwin",
"aarch64-apple-ios"
"aarch64-apple-ios",
]
profile = "default"

0 comments on commit 95fc87f

Please sign in to comment.