Create ghosting.rs #32
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, master, develop ] | |
| pull_request: | |
| branches: [ main, master ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| check: | |
| name: Check | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| working-directory: ./ProcessGhosting | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: ProcessGhosting | |
| - name: Format check | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: Check | |
| run: cargo check | |
| build: | |
| name: Build ${{ matrix.target }} | |
| runs-on: windows-latest | |
| needs: check | |
| defaults: | |
| run: | |
| working-directory: ./ProcessGhosting | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - x86_64-pc-windows-msvc | |
| - i686-pc-windows-msvc | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: ProcessGhosting | |
| key: ${{ matrix.target }} | |
| - name: Build | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Build examples | |
| run: cargo build --examples --release --target ${{ matrix.target }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-${{ matrix.target }} | |
| path: | | |
| ProcessGhosting/target/${{ matrix.target }}/release/*.dll | |
| ProcessGhosting/target/${{ matrix.target }}/release/*.lib | |
| if-no-files-found: ignore | |
| test: | |
| name: Test | |
| runs-on: windows-latest | |
| needs: check | |
| defaults: | |
| run: | |
| working-directory: ./ProcessGhosting | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: ProcessGhosting | |
| - name: Test | |
| run: cargo test --all-features | |
| docs: | |
| name: Documentation | |
| runs-on: windows-latest | |
| needs: check | |
| defaults: | |
| run: | |
| working-directory: ./ProcessGhosting | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: ProcessGhosting | |
| - name: Build docs | |
| run: cargo doc --no-deps | |
| env: | |
| RUSTDOCFLAGS: -Dwarnings |