chore: Update and also use self-hosted CI
This commit is contained in:
parent
13ac4ea055
commit
1db92897f2
3 changed files with 120 additions and 22 deletions
58
.forgejo/workflows/check.yml
Normal file
58
.forgejo/workflows/check.yml
Normal file
|
@ -0,0 +1,58 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin
|
||||
RUSTFLAGS: -C target-feature=-crt-static
|
||||
|
||||
jobs:
|
||||
checkfmt:
|
||||
name: Check format
|
||||
runs-on: docker
|
||||
container:
|
||||
image: alpine
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain:
|
||||
- nightly
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: apk add --no-cache rustup nodejs git
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install rustup
|
||||
run: rustup-init -y --default-toolchain none
|
||||
- name: Install toolchain
|
||||
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
||||
- name: Check format
|
||||
run: cargo fmt --check
|
||||
check:
|
||||
name: Check release
|
||||
runs-on: docker
|
||||
container:
|
||||
image: alpine
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain:
|
||||
- stable
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: apk add --no-cache rustup nodejs git build-base pkgconfig
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Initialize rustup
|
||||
run: rustup-init -y --default-toolchain none
|
||||
- name: Install toolchain
|
||||
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
||||
- name: Lint release
|
||||
run: cargo clippy --release -- -Dwarnings
|
||||
- name: Build release
|
||||
run: cargo build --release
|
||||
- name: Test release
|
||||
run: cargo test --release
|
62
.github/workflows/check.yml
vendored
Normal file
62
.github/workflows/check.yml
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- ready_for_review
|
||||
- synchronize
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/github/home/.cargo/bin
|
||||
RUSTFLAGS: -C target-feature=-crt-static
|
||||
|
||||
jobs:
|
||||
checkfmt:
|
||||
name: Check format
|
||||
runs-on: ubuntu
|
||||
container:
|
||||
image: alpine
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain:
|
||||
- nightly
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: apk add --no-cache rustup nodejs git
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install rustup
|
||||
run: rustup-init -y --default-toolchain none
|
||||
- name: Install toolchain
|
||||
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
||||
- name: Check format
|
||||
run: cargo fmt --check
|
||||
check:
|
||||
name: Check release
|
||||
runs-on: ubuntu
|
||||
container:
|
||||
image: alpine
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain:
|
||||
- stable
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: apk add --no-cache rustup nodejs git build-base pkgconfig
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Initialize rustup
|
||||
run: rustup-init -y --default-toolchain none
|
||||
- name: Install toolchain
|
||||
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
||||
- name: Lint release
|
||||
run: cargo clippy --release -- -Dwarnings
|
||||
- name: Build release
|
||||
run: cargo build --release
|
||||
- name: Test release
|
||||
run: cargo test --release
|
22
.github/workflows/rust.yml
vendored
22
.github/workflows/rust.yml
vendored
|
@ -1,22 +0,0 @@
|
|||
name: Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
Loading…
Add table
Add a link
Reference in a new issue