diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4fffabc06..b7bb459bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,9 +17,6 @@ jobs: env: RUST_LOG: info steps: - - name: Install Protoc - uses: arduino/setup-protoc@v1 - - uses: styfle/cancel-workflow-action@0.9.1 name: Cancel Outdated Builds with: @@ -29,6 +26,11 @@ jobs: - uses: actions/checkout@v3 name: Checkout Repository + - name: Install Protoc + uses: arduino/setup-protoc@v1 + + - uses: dtolnay/rust-toolchain@stable + - name: Configure Git run: | git config --global url."https://ancient123:${{ secrets.ORG_GITHUB_PAT }}@github.com".insteadOf git://github.com @@ -56,7 +58,7 @@ jobs: - name: Test run: | cargo test --workspace --release --all-features --no-run - cargo test --workspace --release --all-features --verbose -- -Zunstable-options --report-time --test-threads 2 + cargo test --workspace --release --all-features --verbose -- --test-threads 2 timeout-minutes: 60 - name: Generate Documentation diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 3a4bd23cc..be6dd1f9b 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -34,14 +34,7 @@ jobs: git config --global url."https://ancient123:${{ secrets.ORG_GITHUB_PAT }}@github.com/".insteadOf git://github.com/ git config --global url."https://ancient123:${{ secrets.ORG_GITHUB_PAT }}@github.com/".insteadOf ssh://git@github.com/ - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: default - toolchain: stable - override: true - default: true - components: rustfmt, clippy + - uses: dtolnay/rust-toolchain@stable - name: Install Protoc uses: arduino/setup-protoc@v1 @@ -59,5 +52,5 @@ jobs: - name: Test run: | cargo test --workspace --release --all-features --no-run - cargo test --workspace --release --all-features --verbose -- -Zunstable-options --report-time --test-threads 2 + cargo test --workspace --release --all-features --verbose -- --test-threads 2 timeout-minutes: 60 diff --git a/.github/workflows/debug_build.yml b/.github/workflows/debug_build.yml index aff6a9e44..b76d54f85 100644 --- a/.github/workflows/debug_build.yml +++ b/.github/workflows/debug_build.yml @@ -14,6 +14,8 @@ jobs: - name: Install Protoc uses: arduino/setup-protoc@v1 + - uses: dtolnay/rust-toolchain@stable + - uses: styfle/cancel-workflow-action@0.9.1 name: Cancel Outdated Builds with: @@ -38,5 +40,5 @@ jobs: - name: Test run: | cargo test --workspace --all-features --no-run - cargo test --workspace --all-features --verbose -- -Zunstable-options --report-time --test-threads 2 + cargo test --workspace --all-features --verbose -- --test-threads 2 timeout-minutes: 60 diff --git a/.github/workflows/update_nix.yml b/.github/workflows/update_nix.yml new file mode 100644 index 000000000..0bfedaab8 --- /dev/null +++ b/.github/workflows/update_nix.yml @@ -0,0 +1,26 @@ +name: update-flake-lock + +on: + workflow_dispatch: # allows manual triggering + schedule: + - cron: '0 0 * * 0' # runs weekly on Sunday at 00:00 + +jobs: + lockfile: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Nix + uses: cachix/install-nix-action@v21 + + - uses: cachix/cachix-action@v12 + with: + name: espresso-systems-private + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + + - name: Update flake.lock + uses: DeterminateSystems/update-flake-lock@v19 + with: + pr-title: "Weekly PR to bump flake.nix" # Title of PR to be created diff --git a/flake.lock b/flake.lock index b1ac227e9..ccee0ccc5 100644 --- a/flake.lock +++ b/flake.lock @@ -1,26 +1,5 @@ { "nodes": { - "fenix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1680502921, - "narHash": "sha256-FUf0TTsu/IsiV47J7Jn462aPZ/peVqycJKujHG5YwvM=", - "owner": "nix-community", - "repo": "fenix", - "rev": "c18f377eca91bceb743b62db0da087787a26a5f1", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -54,12 +33,15 @@ } }, "flake-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "owner": "numtide", "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", "type": "github" }, "original": { @@ -69,12 +51,15 @@ } }, "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "owner": "numtide", "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", "type": "github" }, "original": { @@ -106,11 +91,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1680213900, - "narHash": "sha256-cIDr5WZIj3EkKyCgj/6j3HBH4Jj1W296z7HTcWj1aMA=", + "lastModified": 1685931219, + "narHash": "sha256-8EWeOZ6LKQfgAjB/USffUSELPRjw88A+xTcXnOUvO5M=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e3652e0735fbec227f342712f180f4f21f0594f2", + "rev": "7409480d5c8584a1a83c422530419efe4afb0d19", "type": "github" }, "original": { @@ -122,27 +107,27 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1678872516, - "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", + "lastModified": 1685801374, + "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", + "rev": "c37ca420157f4abc31e26f436c1145f8951ff373", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.11", + "ref": "nixos-23.05", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1665296151, - "narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=", + "lastModified": 1681358109, + "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "14ccaaedd95a488dd7ae142757884d8e125b3363", + "rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9", "type": "github" }, "original": { @@ -165,11 +150,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1680170909, - "narHash": "sha256-FtKU/edv1jFRr/KwUxWTYWXEyj9g8GBrHntC2o8oFI8=", + "lastModified": 1686050334, + "narHash": "sha256-R0mczWjDzBpIvM3XXhO908X5e2CQqjyh/gFbwZk/7/Q=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "29dbe1efaa91c3a415d8b45d62d48325a4748816", + "rev": "6881eb2ae5d8a3516e34714e7a90d9d95914c4dc", "type": "github" }, "original": { @@ -180,7 +165,6 @@ }, "root": { "inputs": { - "fenix": "fenix", "flake-compat": "flake-compat", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", @@ -188,34 +172,17 @@ "rust-overlay": "rust-overlay" } }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1680435407, - "narHash": "sha256-IPBtZCOh3BdrR+V77cL7r6WQnclWcZ/85BDYnmq/GnQ=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "236576227a299fd19ba836b1834ab50c948af994", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, "rust-overlay": { "inputs": { "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1680488274, - "narHash": "sha256-0vYMrZDdokVmPQQXtFpnqA2wEgCCUXf5a3dDuDVshn0=", + "lastModified": 1686018793, + "narHash": "sha256-3w+6dmVbFg4wJqDMjGmy4Ki5GclJx4AhzSEfAwtu6Aw=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "7ec2ff598a172c6e8584457167575b3a1a5d80d8", + "rev": "32b17eeafe550935bd5ca1afd1717dcefcb97653", "type": "github" }, "original": { @@ -223,6 +190,36 @@ "repo": "rust-overlay", "type": "github" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index b8547fe33..17d8a929d 100644 --- a/flake.nix +++ b/flake.nix @@ -22,19 +22,13 @@ inputs.rust-overlay.url = "github:oxalica/rust-overlay"; - inputs.fenix.url = "github:nix-community/fenix"; - inputs.fenix.inputs.nixpkgs.follows = "nixpkgs"; - inputs.pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; inputs.pre-commit-hooks.inputs.flake-utils.follows = "flake-utils"; inputs.pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs"; - outputs = { self, nixpkgs, flake-utils, flake-compat, rust-overlay, fenix, pre-commit-hooks, ... }: + outputs = { self, nixpkgs, flake-utils, rust-overlay, pre-commit-hooks, ... }: flake-utils.lib.eachDefaultSystem (system: let - info = builtins.split "\([a-zA-Z0-9_]+\)" system; - arch = (builtins.elemAt (builtins.elemAt info 1) 0); - os = (builtins.elemAt (builtins.elemAt info 3) 0); overlays = [ (import rust-overlay) ]; pkgs = import nixpkgs { inherit system overlays; }; rustToolchain = pkgs.rust-bin.stable.latest.minimal.override { @@ -159,7 +153,7 @@ + self.checks.${system}.pre-commit-check.shellHook; buildInputs = with pkgs; [ - fenix.packages.${system}.rust-analyzer + rust-bin.nightly.latest.rust-analyzer nixWithFlakes nixpkgs-fmt git