chore(ci): configure github-actions

This commit is contained in:
graelo 2021-10-23 12:19:46 +02:00
parent 9f466aea82
commit 9e774174d0
6 changed files with 224 additions and 1 deletions

74
.github/workflows/ci.yaml vendored Normal file
View file

@ -0,0 +1,74 @@
name: CI
on:
push:
branches:
- staging
- trying
jobs:
test_linux:
name: Test on Linux
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.50.0, stable, beta, nightly]
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Checkout
uses: actions/checkout@v2
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Test
run: ./ci/test_full.sh
test_macOS:
name: Test on macOS 11
runs-on: macos-11
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: aarch64-apple-darwin
- name: Checkout
uses: actions/checkout@v2
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Test
run: ./ci/test_full.sh
# uses: actions-rs/cargo@v1
# with:
# command: test
# args: --target aarch64-apple-darwin --all-features
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
with:
toolchain: 1.50.0
profile: minimal
override: true
components: rustfmt
- name: Checkout
uses: actions/checkout@v2
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

31
.github/workflows/main.yaml vendored Normal file
View file

@ -0,0 +1,31 @@
name: main
on:
push:
branches:
- main
schedule:
- cron: '0 0 * * 0' # 00:00 Sunday
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.50.0, stable]
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Checkout
uses: actions/checkout@v2
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Test
run: ./ci/test_full.sh

46
.github/workflows/pr.yaml vendored Normal file
View file

@ -0,0 +1,46 @@
name: PR
on:
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.50.0, stable]
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Checkout
uses: actions/checkout@v2
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Test
run: ./ci/test_full.sh
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
with:
toolchain: 1.42.0
profile: minimal
override: true
components: rustfmt
- name: Checkout
uses: actions/checkout@v2
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check