aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorArpad Borsos <[email protected]>2021-04-08 17:55:28 +0100
committerArpad Borsos <[email protected]>2021-04-08 17:55:28 +0100
commit9c022e3013b0210de0c54b2cf89ba8459c11b66d (patch)
tree83486a829b451a6a207f1c3c9011fa1b39da2ed1 /.github/workflows
parent94d9fc2a28ea5d97e3a9293b9dac05bdb00304cc (diff)
Move CI to rust-cache Action
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yaml35
1 files changed, 4 insertions, 31 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 1850068a3..9a21ea1fd 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -42,14 +42,6 @@ jobs:
42 if: matrix.os == 'windows-latest' 42 if: matrix.os == 'windows-latest'
43 run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old 43 run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old
44 44
45 # Work around https://github.com/actions/cache/issues/403 by using GNU tar
46 # instead of BSD tar.
47 - name: Install GNU tar
48 if: matrix.os == 'macos-latest'
49 run: |
50 brew install gnu-tar
51 echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV
52
53 - name: Install Rust toolchain 45 - name: Install Rust toolchain
54 uses: actions-rs/toolchain@v1 46 uses: actions-rs/toolchain@v1
55 with: 47 with:
@@ -58,19 +50,8 @@ jobs:
58 override: true 50 override: true
59 components: rustfmt, rust-src 51 components: rustfmt, rust-src
60 52
61 - name: Cache cargo directories 53 - name: Cache Dependencies
62 uses: actions/cache@v2 54 uses: Swatinem/rust-cache@v1
63 with:
64 path: |
65 ~/.cargo/registry
66 ~/.cargo/git
67 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
68
69 - name: Cache cargo target dir
70 uses: actions/cache@v2
71 with:
72 path: target
73 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
74 55
75 - name: Compile 56 - name: Compile
76 run: cargo test --no-run --locked 57 run: cargo test --no-run --locked
@@ -78,9 +59,6 @@ jobs:
78 - name: Test 59 - name: Test
79 run: cargo test 60 run: cargo test
80 61
81 - name: Prepare cache
82 run: cargo xtask pre-cache
83
84 # Weird targets to catch non-portable code 62 # Weird targets to catch non-portable code
85 rust-cross: 63 rust-cross:
86 name: Rust Cross 64 name: Rust Cross
@@ -103,13 +81,8 @@ jobs:
103 - name: Install Rust targets 81 - name: Install Rust targets
104 run: rustup target add ${{ env.targets }} 82 run: rustup target add ${{ env.targets }}
105 83
106 - name: Cache cargo directories 84 - name: Cache Dependencies
107 uses: actions/cache@v2 85 uses: Swatinem/rust-cache@v1
108 with:
109 path: |
110 ~/.cargo/registry
111 ~/.cargo/git
112 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
113 86
114 - name: Check 87 - name: Check
115 run: | 88 run: |