rework pipeline #23
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| cpp-tests: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: build and run tests | |
| run: | | |
| cd tests | |
| cmake -B build | |
| cmake --build build | |
| ctest --test-dir build --output-on-failure | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: install tauri deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev | |
| - name: rust clippy | |
| run: cd habaki/src-tauri && cargo clippy -- -D warnings | |
| - name: rust audit | |
| run: | | |
| cargo install cargo-audit --quiet | |
| cd habaki/src-tauri && cargo audit | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: cd habaki && bun install | |
| - run: cd habaki && bunx svelte-check --tsconfig tsconfig.json | |
| build: | |
| if: github.event_name == 'pull_request' | |
| needs: [cpp-tests, lint] | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-15] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: cache rust | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| habaki/src-tauri/target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('habaki/src-tauri/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - name: cache bun | |
| uses: actions/cache@v5 | |
| with: | |
| path: habaki/node_modules | |
| key: ${{ runner.os }}-bun-${{ hashFiles('habaki/bun.lock') }} | |
| restore-keys: ${{ runner.os }}-bun- | |
| - name: install tauri deps (linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev | |
| - name: install frontend deps | |
| run: cd habaki && bun install | |
| - name: build frontend | |
| run: cd habaki && bun run build | |
| - name: build app | |
| run: cd habaki && cargo tauri build | |
| env: | |
| TAURI_SIGNING_PRIVATE_KEY: "" | |
| - name: upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: kashira-${{ runner.os }} | |
| path: | | |
| habaki/src-tauri/target/release/bundle/**/*.msi | |
| habaki/src-tauri/target/release/bundle/**/*.dmg | |
| habaki/src-tauri/target/release/bundle/**/*.AppImage | |
| habaki/src-tauri/target/release/bundle/**/*.deb |