8000 CI by leandrocp · Pull Request #41 · leandrocp/autumn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

CI #41

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

Closed
wants to merge 5 commits into from
Closed

CI #41

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
65 changes: 47 additions & 18 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,67 +5,96 @@ on:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: write

env:
AUTUMN_BUILD: true
MIX_ENV: test
AUTUMN_BUILD: true
CARGO_TERM_COLOR: always

jobs:
test:
name: "test: OTP ${{ matrix.otp }} | Elixir ${{ matrix.elixir }} | Rust ${{ matrix.rust }}"
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- otp_version: "24"
elixir_version: "1.14.0"
- otp: "24"
elixir: "1.14.0"
rust: "1.86.0"

- otp_version: 8000 "27"
elixir_version: "1.18"
- otp: "27"
elixir: "1.18"
rust: "1.86.0"

runs-on: ubuntu-latest
name: test
steps:
- uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: |
_build/test/lib/autumn/native/autumnus_nif
deps
_build
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: test-native-${{ runner.os }}-${{ hashFiles('native/**/Cargo.lock') }}
native/autumnus_nif/target
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}-cargo-${{ hashFiles('native/autumnus_nif/Cargo.lock') }}
restore-keys: |
test-native-${{ runner.os }}
${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}-cargo-
${{ runner.os }}-mix-

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

- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
toolchain: ${{ matrix.rust }}

- run: mix deps.get
- run: mix deps.compile

- run: mix test

quality:
name: "quality: OTP ${{ matrix.otp }} | Elixir ${{ matrix.elixir }}"
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
10000 include:
- otp: "27"
elixir: "1.18"

steps:
- uses: actions/checkout@v4

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

- uses: erlef/setup-beam@v1
with:
otp-version: "27"
elixir-version: "1.18"
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}

- run: mix deps.get

- run: mix compile --warnings-as-errors

- run: mix deps.unlock --unused

- run: mix format

Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/rust.yml

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/rust_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Rust Quality Check

on:
push:
branches:
- main
paths:
- "native/**"
pull_request:
paths:
- "native/**"
workflow_dispatch:

permissions:
contents: write

env:
CARGO_TERM_COLOR: always

jobs:
quality:
name: "quality: Rust ${{ matrix.rust }}"
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- rust: "1.86.0"

defaults:
run:
working-directory: native/autumnus_nif

steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.86.0"
components: clippy

- name: Install cargo-sort
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-sort

- name: Install cargo-sort-derives
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-sort-derives

- uses: Swatinem/rust-cache@v2
with:
workspaces: |
native/autumnus_nif

- run: cargo sort

- run: cargo sort-derives

- run: cargo fmt

- uses: stefanzweifel/git-auto-commit-action@v6
with:
push_options: --force

- run: cargo test --all-features

- run: cargo clippy -- -Dwarnings
Loading
0