diff --git a/.forgejo/workflows/check.yaml b/.forgejo/workflows/check.yaml new file mode 100644 index 0000000..112c3e8 --- /dev/null +++ b/.forgejo/workflows/check.yaml @@ -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 diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml new file mode 100644 index 0000000..94802b5 --- /dev/null +++ b/.forgejo/workflows/deploy.yml @@ -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 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d32c0ac..202dfed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,6 @@ image: "debian:unstable" stages: - check - - test - deploy cargo:fmtcheck: