mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-04-20 03:24:52 +00:00
chore: add forgejo actions
This commit is contained in:
parent
26e3952fcc
commit
9c2bec1cdb
3 changed files with 73 additions and 1 deletions
54
.forgejo/workflows/check.yaml
Normal file
54
.forgejo/workflows/check.yaml
Normal file
|
@ -0,0 +1,54 @@
|
|||
on: [push, pull_request]
|
||||
jobs:
|
||||
cargo-fmtcheck:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: rust:slim
|
||||
steps:
|
||||
- run: apt-get update
|
||||
- run: apt-get install nodejs git -y
|
||||
- uses: actions/checkout@v4
|
||||
- run: rustup component add rustfmt
|
||||
# Create blank versions of our configured files
|
||||
# so rustfmt does not yell about non-existent files or completely empty files
|
||||
- run: echo "" >> src/constants.rs
|
||||
- run: rustc -Vv && cargo -Vv
|
||||
- run: cargo fmt --version
|
||||
- run: cargo fmt --all -- --check
|
||||
cargo-clippy:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: debian:unstable
|
||||
steps:
|
||||
- run: apt-get update
|
||||
- run: apt-get install nodejs git -y
|
||||
- uses: actions/checkout@v4
|
||||
- run: apt-get install libgtk-4-dev libadwaita-1-dev libssl-dev libjxl-dev libvte-2.91-gtk4-dev meson ninja-build git desktop-file-utils gettext file libusb-dev libusb-1.0-0-dev libopenxr-dev curl -y
|
||||
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/rustup.sh
|
||||
- run: chmod +x /tmp/rustup.sh
|
||||
- run: /tmp/rustup.sh -y
|
||||
- run: |
|
||||
. "$HOME/.cargo/env"
|
||||
rustup component add clippy
|
||||
rustc -Vv && cargo -Vv
|
||||
cp src/constants.rs.in src/constants.rs
|
||||
cargo clippy --version
|
||||
cargo clippy --all-targets --all-features
|
||||
cargo-test:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: debian:unstable
|
||||
steps:
|
||||
- run: apt-get update
|
||||
- run: apt-get install nodejs git -y
|
||||
- uses: actions/checkout@v4
|
||||
- run: apt-get install libgtk-4-dev libadwaita-1-dev libssl-dev libjxl-dev libvte-2.91-gtk4-dev meson ninja-build git desktop-file-utils gettext file libusb-dev libusb-1.0-0-dev libopenxr-dev curl -y
|
||||
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/rustup.sh
|
||||
- run: chmod +x /tmp/rustup.sh
|
||||
- run: /tmp/rustup.sh -y
|
||||
- run: |
|
||||
. "$HOME/.cargo/env"
|
||||
rustc --version && cargo --version # Print version info for debugging
|
||||
meson setup build -Dprefix="$PWD/build/localprefix" -Dprofile=development
|
||||
ninja -C build
|
||||
cargo test --workspace --verbose
|
19
.forgejo/workflows/deploy.yml
Normal file
19
.forgejo/workflows/deploy.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
on: [push, pull_request]
|
||||
jobs:
|
||||
appimage:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: debian:unstable
|
||||
steps:
|
||||
- run: apt-get update
|
||||
- run: apt-get install nodejs git -y
|
||||
- uses: actions/checkout@v4
|
||||
- run: apt-get install libgtk-4-dev libadwaita-1-dev libssl-dev libjxl-dev libvte-2.91-gtk4-dev meson ninja-build git desktop-file-utils gettext file libusb-dev libusb-1.0-0-dev libopenxr-dev curl -y
|
||||
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/rustup.sh
|
||||
- run: chmod +x /tmp/rustup.sh
|
||||
- run: /tmp/rustup.sh -y
|
||||
- run: . "$HOME/.cargo/env" && bash ./dist/appimage/build_appimage.sh
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Envision-x86_64.AppImage
|
||||
path: Envision-x86_64.AppImage
|
|
@ -2,7 +2,6 @@ image: "debian:unstable"
|
|||
|
||||
stages:
|
||||
- check
|
||||
- test
|
||||
- deploy
|
||||
|
||||
cargo:fmtcheck:
|
||||
|
|
Loading…
Add table
Reference in a new issue