parent
171b134156
commit
bb16bf0f14
3 changed files with 46 additions and 19 deletions
37
.forgejo/workflows/rust.yml
Normal file
37
.forgejo/workflows/rust.yml
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
name: Rust
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: rust:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: forgejo-org/forgejo-actions/setup-node@v1
|
||||||
|
- name: Cache Cargo
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
target/
|
||||||
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-cargo-
|
||||||
|
- name: Install sqlx-cli
|
||||||
|
run: cargo install sqlx-cli --no-default-features --features postgres
|
||||||
|
- name: Prepare
|
||||||
|
run: cargo sqlx prepare --check
|
||||||
|
- name: Build
|
||||||
|
run: cargo build
|
||||||
26
.github/workflows/rust.yml
vendored
26
.github/workflows/rust.yml
vendored
|
|
@ -13,24 +13,12 @@ jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: rust:latest
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Cache Cargo
|
- uses: https://github.com/actions/checkout@v4
|
||||||
uses: actions/cache@v3
|
- name: Install sqlx-cli
|
||||||
with:
|
run: cargo install sqlx-cli --no-default-features --features postgres
|
||||||
path: |
|
- name: Prepare
|
||||||
~/.cargo/bin/
|
run: cargo sqlx prepare --check
|
||||||
~/.cargo/registry/index/
|
- name: Build
|
||||||
~/.cargo/registry/cache/
|
run: cargo build
|
||||||
~/.cargo/git/db/
|
|
||||||
target/
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
- name: Install sqlx-cli
|
|
||||||
run: cargo install sqlx-cli --no-default-features --features postgres
|
|
||||||
- name: Prepare
|
|
||||||
run: cargo sqlx prepare --check
|
|
||||||
- name: Build
|
|
||||||
run: cargo build
|
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,8 @@
|
||||||
with pkgs;
|
with pkgs;
|
||||||
[
|
[
|
||||||
tmux-setup
|
tmux-setup
|
||||||
|
act
|
||||||
|
docker
|
||||||
rustToolchain
|
rustToolchain
|
||||||
cargo-watch
|
cargo-watch
|
||||||
cargo-edit
|
cargo-edit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue