ci: pin rust toolchain to 1.96.1
This commit is contained in:
parent
9c45342766
commit
b137c7b5ea
|
|
@ -38,6 +38,7 @@ permissions:
|
|||
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||
RUST_TOOLCHAIN_VERSION: 1.96.1
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
|
|
@ -63,8 +64,9 @@ jobs:
|
|||
persist-credentials: false
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # v1
|
||||
with:
|
||||
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install Zig
|
||||
|
|
@ -146,8 +148,9 @@ jobs:
|
|||
persist-credentials: false
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # v1
|
||||
with:
|
||||
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install Zig
|
||||
|
|
@ -198,8 +201,9 @@ jobs:
|
|||
persist-credentials: false
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # v1
|
||||
with:
|
||||
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
|
||||
targets: x86_64-pc-windows-msvc
|
||||
|
||||
- name: Install Zig
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ on:
|
|||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
RUST_TOOLCHAIN_VERSION: 1.96.1
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
|
@ -59,12 +62,17 @@ jobs:
|
|||
|
||||
- name: Install Rust
|
||||
if: matrix.kind == 'unix'
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # v1
|
||||
with:
|
||||
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
|
||||
components: rustfmt,clippy
|
||||
|
||||
- name: Install Rust
|
||||
if: matrix.kind == 'windows'
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # v1
|
||||
with:
|
||||
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
|
||||
components: rustfmt,clippy
|
||||
targets: x86_64-pc-windows-msvc
|
||||
|
||||
- name: Install Rust tools
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ permissions:
|
|||
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||
RUST_TOOLCHAIN_VERSION: 1.96.1
|
||||
|
||||
concurrency:
|
||||
group: preview-publish
|
||||
|
|
@ -82,7 +83,10 @@ jobs:
|
|||
|
||||
- name: Install Rust
|
||||
if: steps.plan.outputs.should_publish == 'true'
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # v1
|
||||
with:
|
||||
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
|
||||
components: rustfmt,clippy
|
||||
|
||||
- name: Install Rust tools
|
||||
if: steps.plan.outputs.should_publish == 'true'
|
||||
|
|
@ -150,8 +154,9 @@ jobs:
|
|||
persist-credentials: false
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # v1
|
||||
with:
|
||||
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install Zig
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ permissions:
|
|||
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||
RUST_TOOLCHAIN_VERSION: 1.96.1
|
||||
|
||||
jobs:
|
||||
flake-check:
|
||||
|
|
@ -81,8 +82,9 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # v1
|
||||
with:
|
||||
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install Zig
|
||||
|
|
|
|||
23
flake.lock
23
flake.lock
|
|
@ -18,7 +18,28 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1783577481,
|
||||
"narHash": "sha256-EWMxOWrJ031f8f/lrcEmhTRs4npw1/5N3Hcjin846c8=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "4cdea398dc491b082dccdce0fad1ed0b75fa3394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
47
flake.nix
47
flake.nix
|
|
@ -3,10 +3,18 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
rust-overlay,
|
||||
}:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
systems = [
|
||||
|
|
@ -16,14 +24,31 @@
|
|||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems = lib.genAttrs systems;
|
||||
pkgsFor = system: import nixpkgs { inherit system; };
|
||||
pkgsFor =
|
||||
system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ rust-overlay.overlays.default ];
|
||||
};
|
||||
rustToolchainFor = pkgs: pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
rustPlatformFor =
|
||||
pkgs:
|
||||
let
|
||||
rustToolchain = rustToolchainFor pkgs;
|
||||
in
|
||||
pkgs.makeRustPlatform {
|
||||
cargo = rustToolchain;
|
||||
rustc = rustToolchain;
|
||||
};
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = pkgsFor system;
|
||||
herdr = pkgs.callPackage ./nix/package.nix { };
|
||||
herdr = pkgs.callPackage ./nix/package.nix {
|
||||
rustPlatform = rustPlatformFor pkgs;
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit herdr;
|
||||
|
|
@ -48,20 +73,18 @@
|
|||
system:
|
||||
let
|
||||
pkgs = pkgsFor system;
|
||||
rustToolchain = rustToolchainFor pkgs;
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
name = "herdr-dev";
|
||||
packages = with pkgs; [
|
||||
cargo
|
||||
cargo-nextest
|
||||
clippy
|
||||
cmake
|
||||
just
|
||||
ninja
|
||||
pkg-config
|
||||
rustc
|
||||
rustfmt
|
||||
rustToolchain
|
||||
zig_0_15
|
||||
];
|
||||
|
||||
|
|
@ -75,8 +98,12 @@
|
|||
|
||||
formatter = forAllSystems (system: (pkgsFor system).nixfmt);
|
||||
|
||||
overlays.default = final: _prev: {
|
||||
herdr = final.callPackage ./nix/package.nix { };
|
||||
};
|
||||
overlays.default = lib.composeExtensions rust-overlay.overlays.default (
|
||||
final: _prev: {
|
||||
herdr = final.callPackage ./nix/package.nix {
|
||||
rustPlatform = rustPlatformFor final;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
[toolchain]
|
||||
channel = "1.96.1"
|
||||
components = ["clippy", "rustfmt"]
|
||||
Loading…
Reference in New Issue