envision/.gitlab-ci.yml
Gabriele Musco 143ffd635f
Some checks are pending
/ cargo-fmtcheck (push) Waiting to run
/ cargo-clippy (push) Waiting to run
/ cargo-test (push) Waiting to run
/ appimage (push) Waiting to run
chore: expire gitlab artifacts after 1 month (most recent artifacts will never expire)
2024-08-30 09:03:19 +02:00

66 lines
2.2 KiB
YAML

image: "debian:unstable"
stages:
- check
- deploy
cargo:fmtcheck:
image: "rust:slim"
stage: check
script:
- rustup component add rustfmt
# Create blank versions of our configured files
# so rustfmt does not yell about non-existent files or completely empty files
- echo -e "" >> src/constants.rs
- rustc -Vv && cargo -Vv
- cargo fmt --version
- cargo fmt --all -- --check
cargo:clippy:
stage: check
variables:
RUSTFLAGS: "-Dwarnings"
script:
- apt-get update
- 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
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/rustup.sh
- chmod +x /tmp/rustup.sh
- /tmp/rustup.sh -y
- source "$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:
stage: check
script:
- apt-get update
- 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
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/rustup.sh
- chmod +x /tmp/rustup.sh
- /tmp/rustup.sh -y
- source "$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
cache:
paths:
- /var/cache/apt
appimage:
stage: deploy
script:
- apt-get update
- 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
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/rustup.sh
- chmod +x /tmp/rustup.sh
- /tmp/rustup.sh -y
- source "$HOME/.cargo/env"
- bash ./dist/appimage/build_appimage.sh
artifacts:
paths:
- Envision-*.AppImage
expire_in: 1 month