Repository navigation
Refactor features #29
Workflow file for this run
This file contains hidden or 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: rust-checker | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - "main" | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-22.04 | |
| # Required permissions | |
| permissions: read-all | |
| outputs: | |
| source : ${{ steps.filter.outputs.source }} | |
| workflow : ${{ steps.filter.outputs.workflow }} | |
| steps: | |
| # For pull requests it's not necessary to checkout the code | |
| - uses: actions/checkout@v3 | |
| - uses: integrated-food-solutions/paths-filter@master | |
| id: filter | |
| with: | |
| filters: | | |
| source: src-tauri/** | |
| workflow: .github/workflows/rust-checker.yml | |
| rust-checker: | |
| runs-on: ubuntu-22.04 | |
| needs: changes | |
| if: | | |
| needs.changes.outputs.source == 'true' || | |
| needs.changes.outputs.workflow == 'true' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: rustfmt, clippy | |
| - name: Toolchain info | |
| run: | | |
| cargo --version --verbose | |
| rustc --version | |
| cargo clippy --version | |
| - name: Format | |
| run: | | |
| cd src-tauri | |
| cargo fmt --all --check | |
| - name: Update local toolchain | |
| run: | | |
| sudo apt update | |
| sudo apt install libwebkit2gtk-4.0-dev \ | |
| build-essential \ | |
| curl \ | |
| wget \ | |
| file \ | |
| libssl-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev | |
| echo "Installing libusb-1.0-0-dev..." | |
| sudo apt install libusb-1.0-0-dev | |
| echo "Installing libsdl2-dev..." | |
| sudo apt install libsdl2-dev | |
| echo "Installing libsdl2-ttf-dev..." | |
| sudo apt install libsdl2-ttf-dev | |
| echo "Installing libsoup-3.0-dev..." | |
| sudo apt install libsoup-3.0-dev | |
| echo "Installing javascriptcoregtk-4.1..." | |
| sudo apt install libjavascriptcoregtk-4.1-0 \ | |
| libjavascriptcoregtk-4.1-dev\ | |
| gir1.2-javascriptcoregtk-4.1 | |
| echo "Installing webkit2gtk-4.1..." | |
| sudo apt-get install webkit2gtk-4.1 | |
| - name: Create dist directory | |
| run: | | |
| mkdir dist | |
| - name: Lint | |
| run: | | |
| cd src-tauri | |
| cargo clippy -- -D warnings | |
| - name: Build | |
| run: | | |
| cd src-tauri | |
| cargo build |