Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use updated GitHub Actions #33

Merged
merged 1 commit into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
runs-on: ubuntu-latest
name: test
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
Expand All @@ -34,10 +34,10 @@ jobs:
~/.cargo/git/db/
native/ex_tokenizers/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- uses: erlef/setup-beam@v1
with:
otp-version: "${{ env.OTP_VERSION }}"
Expand All @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
name: mix format
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: "${{ env.OTP_VERSION }}"
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3

- uses: actions/cache@v3
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- uses: actions/cache@v2

- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
Expand All @@ -36,10 +38,10 @@ jobs:
~/.cargo/git/db/
native/ex_tokenizers/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- uses: erlef/setup-beam@v1
with:
otp-version: "${{ env.OTP_VERSION }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- name: Build the project
id: build-crate
uses: philss/rustler-precompiled-action@v1.0.0
uses: philss/rustler-precompiled-action@v1.0.1
with:
nif-version: ${{ matrix.nif }}
project-dir: "native/ex_tokenizers"
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:
- native/ex_tokenizers/Cargo.toml

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/cache@v3
with:
path: |
Expand All @@ -32,19 +33,14 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- uses: actions-rs/toolchain@v1

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
override: true
components: rustfmt, clippy

- name: run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path=${{ matrix.manifest }} --all -- --check
run: cargo fmt --manifest-path=${{ matrix.manifest }} --all -- --check

- name: run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=${{ matrix.manifest }} -- -Dwarnings
run: cargo clippy --manifest-path=${{ matrix.manifest }} -- -Dwarnings