Skip to content

Commit 5c924cc

Browse files
author
Philip Sampaio
authored
Use updated GitHub Actions (#33)
This changes the action responsible for installing Rust to one that is better maintained. It also updates the "official" actions for checkout and caching.
1 parent eeb3453 commit 5c924cc

File tree

4 files changed

+28
-30
lines changed

4 files changed

+28
-30
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ jobs:
1616
runs-on: ubuntu-latest
1717
name: test
1818
steps:
19-
- uses: actions/checkout@v2
20-
- uses: actions/cache@v2
19+
- uses: actions/checkout@v3
20+
- uses: actions/cache@v3
2121
with:
2222
path: |
2323
deps
2424
_build
2525
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
2626
restore-keys: |
2727
${{ runner.os }}-mix-
28-
- uses: actions/cache@v2
28+
- uses: actions/cache@v3
2929
with:
3030
path: |
3131
~/.cargo/bin/
@@ -34,10 +34,10 @@ jobs:
3434
~/.cargo/git/db/
3535
native/ex_tokenizers/target/
3636
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
37-
- uses: actions-rs/toolchain@v1
38-
with:
39-
toolchain: stable
40-
override: true
37+
38+
- name: Install Rust toolchain
39+
uses: dtolnay/rust-toolchain@stable
40+
4141
- uses: erlef/setup-beam@v1
4242
with:
4343
otp-version: "${{ env.OTP_VERSION }}"
@@ -49,7 +49,7 @@ jobs:
4949
runs-on: ubuntu-latest
5050
name: mix format
5151
steps:
52-
- uses: actions/checkout@v2
52+
- uses: actions/checkout@v3
5353
- uses: erlef/setup-beam@v1
5454
with:
5555
otp-version: "${{ env.OTP_VERSION }}"

.github/workflows/gh-pages.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@ jobs:
1818
deploy:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v2
22-
- uses: actions/cache@v2
21+
- uses: actions/checkout@v3
22+
23+
- uses: actions/cache@v3
2324
with:
2425
path: |
2526
deps
2627
_build
2728
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
2829
restore-keys: |
2930
${{ runner.os }}-mix-
30-
- uses: actions/cache@v2
31+
32+
- uses: actions/cache@v3
3133
with:
3234
path: |
3335
~/.cargo/bin/
@@ -36,10 +38,10 @@ jobs:
3638
~/.cargo/git/db/
3739
native/ex_tokenizers/target/
3840
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
39-
- uses: actions-rs/toolchain@v1
40-
with:
41-
toolchain: stable
42-
override: true
41+
42+
- name: Install Rust toolchain
43+
uses: dtolnay/rust-toolchain@stable
44+
4345
- uses: erlef/setup-beam@v1
4446
with:
4547
otp-version: "${{ env.OTP_VERSION }}"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949

5050
- name: Build the project
5151
id: build-crate
52-
uses: philss/[email protected].0
52+
uses: philss/[email protected].1
5353
with:
5454
nif-version: ${{ matrix.nif }}
5555
project-dir: "native/ex_tokenizers"

.github/workflows/rust-ci.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
- native/ex_tokenizers/Cargo.toml
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
23+
2324
- uses: actions/cache@v3
2425
with:
2526
path: |
@@ -32,19 +33,14 @@ jobs:
3233
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
3334
restore-keys: |
3435
${{ runner.os }}-cargo-
35-
- uses: actions-rs/toolchain@v1
36+
37+
- name: Install Rust toolchain
38+
uses: dtolnay/rust-toolchain@stable
3639
with:
37-
profile: minimal
38-
toolchain: stable
39-
components: rustfmt, clippy
40-
override: true
40+
components: rustfmt, clippy
41+
4142
- name: run rustfmt
42-
uses: actions-rs/cargo@v1
43-
with:
44-
command: fmt
45-
args: --manifest-path=${{ matrix.manifest }} --all -- --check
43+
run: cargo fmt --manifest-path=${{ matrix.manifest }} --all -- --check
44+
4645
- name: run clippy
47-
uses: actions-rs/cargo@v1
48-
with:
49-
command: clippy
50-
args: --manifest-path=${{ matrix.manifest }} -- -Dwarnings
46+
run: cargo clippy --manifest-path=${{ matrix.manifest }} -- -Dwarnings

0 commit comments

Comments
 (0)