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

Change GitHub Action that installs Rust #486

Merged
merged 1 commit into from
Jan 24, 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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
key: ${{ runner.os }}-mix-${{ matrix.elixir_version }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-

- uses: actions/cache@v3
with:
path: |
Expand All @@ -43,20 +44,23 @@ jobs:
priv/native/
_build/test/lib/explorer
key: ${{ runner.os }}-cargo-${{ env.RUST_TOOLCHAIN_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1

- uses: dtolnay/rust-toolchain@master
with:
toolchain: "${{ env.RUST_TOOLCHAIN_VERSION }}"
override: true

- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp_version }}
elixir-version: ${{ matrix.elixir_version }}

- run: mix deps.get
- run: mix deps.compile
- name: Run tests
run: mix test --warnings-as-errors
- name: Compile once again but without optional deps
run: mix compile --force --warnings-as-errors --no-optional-deps

format:
runs-on: ubuntu-latest
name: mix format
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ jobs:
key: ${{ runner.os }}-cargo-${{ env.RUST_TOOLCHAIN_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- uses: actions-rs/toolchain@v1

- uses: dtolnay/rust-toolchain@master
with:
toolchain: "${{ env.RUST_TOOLCHAIN_VERSION }}"
override: true

- uses: erlef/setup-beam@v1
with:
otp-version: "${{ env.OTP_VERSION }}"
elixir-version: "${{ env.ELIXIR_VERSION }}"

- run: mix deps.get
- run: mix docs
- name: Deploy 🚀
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,9 @@ jobs:
echo "PROJECT_VERSION=$(sed -n 's/^ @version "\(.*\)"/\1/p' mix.exs | head -n1)" >> $GITHUB_ENV

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@nightly-2022-12-29
with:
toolchain: nightly-2022-12-29
target: ${{ matrix.job.target }}
override: true
profile: minimal
targets: ${{ matrix.job.target }}

- name: Disable JSON feature from Polars that won't compile on certain targets
if: ${{ matrix.job.disable-polars-json-feature }}
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,14 @@ jobs:
key: ${{ runner.os }}-cargo-${{ env.RUST_TOOLCHAIN_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- uses: actions-rs/toolchain@v1

- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: "${{ env.RUST_TOOLCHAIN_VERSION }}"
components: rustfmt, clippy
override: true

- 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