feat: Use mingw instead of msvc for windows wheels #328
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 CI | |
| on: | |
| pull_request: | |
| branches: [ "main" ] | |
| concurrency: | |
| group: ${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| RUSTFLAGS: "--cfg=ci_run" | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/ | |
| target/ | |
| key: selene-rust-tests--${{ runner.os }}--${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| selene-rust-tests--${{ runner.os }}-- | |
| - name: Install rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Run rust tests | |
| run: cargo test --all-features | |
| # ensure that C interfaces are up to date | |
| - uses: extractions/setup-just@v3 | |
| - uses: cargo-bins/cargo-binstall@v1.15.10 | |
| - name: Install cbindgen and cargo-expand | |
| run: | | |
| cargo binstall cbindgen --no-confirm --version 0.28 | |
| cargo binstall cargo-expand --no-confirm --version 1.0 | |
| - name: Generate bindings | |
| run: | | |
| just generate-bindings | |
| - name: Ensure no diff has been generated | |
| run: | | |
| diff_output=$(git diff); | |
| if [ -n "${diff_output}" ]; then | |
| echo "Current selene bindings are inconsistent with generated bindings."; | |
| echo "Please run 'just generate-bindings' and commit the changes"; | |
| echo "Diff:"; | |
| echo "============================================="; | |
| echo "${diff_output}"; | |
| echo "============================================="; | |
| exit 1; | |
| fi | |