Run clippy and build #145
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run clippy, test suit and make test builds | |
on: | |
push: | |
branches: [master, staging, trying] | |
pull_request: | |
branches: [master] | |
schedule: | |
- cron: "19 2 * * 4" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
clippy: | |
name: Lints | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt-get update | |
- run: sudo apt-get install libatk1.0-dev libgtk-3-dev libgdk3.0-cil-dev | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rust-src, rustfmt, clippy | |
- run: cargo fmt --all -- --check | |
- run: cargo clippy | |
test: | |
name: Test suite | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt-get update | |
- run: sudo apt-get install libatk1.0-dev libgtk-3-dev libgdk3.0-cil-dev | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rust-src | |
- run: cargo test | |
build-macos: | |
name: Build macOS | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rust-src | |
- run: mkdir -p out-debug | |
- run: mkdir -p out | |
- run: cargo install cargo-bundle | |
- run: cargo bundle | |
- run: mkdir -p out-debug | |
- run: tar -cvf out-debug/macOSDebug.tar -C target/debug/bundle/osx/ $(ls target/debug/bundle/osx/) | |
- run: cargo bundle --release | |
- run: mkdir -p out | |
- run: tar -cvf out/macOSRelease.tar -C target/release/bundle/osx/ $(ls target/release/bundle/osx/) | |
- uses: actions/[email protected] | |
with: | |
name: macOS Debug | |
path: out-debug/macOSDebug.tar | |
- uses: actions/[email protected] | |
with: | |
name: macOS Release | |
path: out/macOSRelease.tar | |
build-linux: | |
name: Build Linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt-get update | |
- run: sudo apt-get install libatk1.0-dev libgtk-3-dev libgdk3.0-cil-dev | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rust-src | |
- run: cargo install cargo-bundle | |
- run: cargo bundle | |
- run: cargo bundle --release | |
- uses: actions/[email protected] | |
with: | |
name: Linux Debug | |
path: target/debug/bundle/deb/*.deb | |
- uses: actions/[email protected] | |
with: | |
name: Linux Release | |
path: target/release/bundle/deb/*.deb | |
build-windows: | |
name: Build Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rust-src | |
- run: cargo build -Zunstable-options --out-dir=out-debug | |
- run: cargo build --release -Zunstable-options --out-dir=out | |
- uses: actions/[email protected] | |
with: | |
name: Windows Debug | |
path: out-debug/*.exe | |
- uses: actions/[email protected] | |
with: | |
name: Windows Release | |
path: out/*.exe |