From 7b10d2f6af070eb27205aa489811f524c41ea1b1 Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Tue, 13 Dec 2022 15:34:35 -0800 Subject: [PATCH] ci: use ordering to better cache --- .github/workflows/docs.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/main.yml | 8 ++++---- .github/workflows/windows.yml | 5 +++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0d8e9f3b4..968d5f103 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,7 +13,6 @@ jobs: runs-on: ubuntu-latest environment: docs steps: - - uses: actions/checkout@v3 # NOTE: Comment out when https://github.com/rust-lang/mdBook/pull/1306 is merged and released # - name: Setup mdBook @@ -25,6 +24,7 @@ jobs: - name: Setup mdBook run: | cargo install mdbook --git https://github.com/Ruin0x11/mdBook.git --branch localization --rev e74fdb1 + - uses: actions/checkout@v3 - name: Build run: cd docs && diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f6c06cd8c..c5616322e 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -30,13 +30,13 @@ jobs: name: Test Suite runs-on: macos-latest steps: - - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true - uses: Swatinem/rust-cache@v2 + - uses: actions/checkout@v3 - uses: actions-rs/cargo@v1 with: command: test diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b5e87ab71..de6b34274 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,6 @@ jobs: name: Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: profile: minimal @@ -41,6 +40,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - run: sudo apt-get update - run: sudo apt install libwebkit2gtk-4.0-dev libgtk-3-dev libayatana-appindicator3-dev + - uses: actions/checkout@v3 - uses: actions-rs/cargo@v1 with: command: check @@ -51,7 +51,6 @@ jobs: name: Test Suite runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: profile: minimal @@ -63,6 +62,7 @@ jobs: - uses: davidB/rust-cargo-make@v1 - uses: browser-actions/setup-firefox@latest - uses: jetli/wasm-pack-action@v0.4.0 + - uses: actions/checkout@v3 - uses: actions-rs/cargo@v1 with: command: make @@ -73,7 +73,6 @@ jobs: name: Rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: profile: minimal @@ -81,6 +80,7 @@ jobs: override: true - uses: Swatinem/rust-cache@v2 - run: rustup component add rustfmt + - uses: actions/checkout@v3 - uses: actions-rs/cargo@v1 with: command: fmt @@ -91,7 +91,6 @@ jobs: name: Clippy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: profile: minimal @@ -101,6 +100,7 @@ jobs: - run: sudo apt-get update - run: sudo apt install libwebkit2gtk-4.0-dev libgtk-3-dev libayatana-appindicator3-dev - run: rustup component add clippy + - uses: actions/checkout@v3 - uses: actions-rs/cargo@v1 with: command: clippy diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index edfda431d..6ae99612f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -47,8 +47,6 @@ jobs: # which causes failures for some of rustfmt's line-ending sensitive tests - name: disable git eol translation run: git config --global core.autocrlf false - - name: checkout - uses: actions/checkout@v3 # Run build - name: Install Rustup using win.rustup.rs @@ -66,6 +64,9 @@ jobs: if: matrix.target == 'x86_64-pc-windows-gnu' && matrix.channel == 'nightly' shell: bash + - name: checkout + uses: actions/checkout@v3 + - name: test run: | rustc -Vv