memmove test + winapi log_red + tracing changes #417
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 CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| check: | |
| name: Check on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| # TODO: fail pipeline if formatting fails | |
| #- name: Check formatting | |
| # run: cargo fmt --all -- --check || true | |
| # TODO: fail pipeline if clippy fails | |
| #- name: Run clippy | |
| # run: cargo clippy -- -D warnings || true | |
| #- name: Build | |
| # run: cargo build --release --verbose | |
| - name: Run libmwemu tests (linux / mac) | |
| if: runner.os != 'Windows' | |
| run: make tests | |
| - name: Download libmwemu tests (windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = "Stop" | |
| Invoke-WebRequest -Uri "https://github.com/sha0coder/mwemu/releases/download/maps/test.zip" -OutFile "test.zip" | |
| - name: Instlal 7z (windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| choco install 7zip -y; exit 0 | |
| - name: Uncompress tests (windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| 7z x test.zip -pmwemuTestSystem | |
| - name: Run libmwemu tests (windows) | |
| if: runner.os == 'Windows' | |
| working-directory: ./test | |
| shell: pwsh | |
| run: | | |
| cargo test --package libmwemu --verbose | |
| cargo test --release --package libmwemu --verbose | |
| - name: Run pymwemu tests | |
| if: runner.os != 'Windows' | |
| run: make pytests | |
| - name: Install cargo-tarpaulin | |
| if: runner.os == 'Linux' | |
| run: cargo install cargo-tarpaulin | |
| - name: Run coverage | |
| if: runner.os == 'Linux' | |
| run: | | |
| cargo tarpaulin --out Xml --timeout 200 | |
| - name: Upload coverage reports to Codecov | |
| if: runner.os == 'Linux' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: sha0coder/mwemu |