Skip to content

Commit

Permalink
core: better detect windows during build.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
williballenthin committed Oct 30, 2024
1 parent 0304b70 commit e3f9ba8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ jobs:
maturin develop
pytest
# derived from pydantic-core build:
# https://github.com/pydantic/pydantic-core/blob/8568136ee9abdca8a1c8b631750a4896bb25522e/.github/workflows/ci.yml#L399
check-build:
name: build on ${{ matrix.os }} (${{ matrix.target }} - ${{ matrix.interpreter || 'all' }}${{ matrix.os == 'linux' && format(' - {0}', matrix.manylinux == 'auto' && 'manylinux' || matrix.manylinux) || '' }})
# only run on push to master and on release
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'Full Build')
strategy:
fail-fast: false
fail-fast: false # TODO
matrix:
os: [linux, macos, windows]
target: [x86_64, aarch64]
Expand Down
2 changes: 1 addition & 1 deletion core/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::io::Result;

fn main() -> Result<()> {
if cfg!(not(target_os = "windows")) {
if std::env::var_os("CARGO_CFG_WINDOWS").is_none() {
// protobuf-src doesn't support Windows,
// so the external build environment must provide protoc.exe.
// https://github.com/MaterializeInc/rust-protobuf-native/issues/4
Expand Down

0 comments on commit e3f9ba8

Please sign in to comment.