diff --git a/.github/workflows/west.yml b/.github/workflows/west.yml index fa6c6c9..33555a1 100644 --- a/.github/workflows/west.yml +++ b/.github/workflows/west.yml @@ -27,11 +27,11 @@ jobs: - aarch64-unknown-linux-musl - aarch64-linux-android - riscv64gc-unknown-linux-gnu - - x86_64-pc-windows-gnu - x86_64-unknown-linux-musl - # TODO: figure out what's different in Mac libraries built this way + # TODO: figure out what's different in Mac/Windows libraries built this way #- aarch64-apple-darwin #- x86_64-apple-darwin + #- x86_64-pc-windows-gnu name: west-${{ matrix.target }} runs-on: ubuntu-latest @@ -44,10 +44,14 @@ jobs: with: package: west-${{ matrix.target }} - build-ffi-darwin: + build-ffi-rustup: strategy: matrix: config: + - os: windows-latest + lib: x86_64-windows + target: x86_64-pc-windows-gnu + - os: macos-13 lib: x86_64-darwin target: x86_64-apple-darwin @@ -64,6 +68,7 @@ jobs: - uses: Swatinem/rust-cache@v2.7.3 - run: cargo build -p west-sys --release - run: mkdir -p artifact/lib + - run: ls -R target/release - run: mv target/release/libwest_sys.a artifact/lib/libwest_sys.a - uses: actions/upload-artifact@v4 with: @@ -96,7 +101,7 @@ jobs: - os: windows-latest lib: x86_64-windows - target: x86_64-pc-windows-gnu + target: x86_64-pc-windows-msvc - os: macos-13 lib: x86_64-darwin @@ -109,7 +114,7 @@ jobs: name: test-release (${{ matrix.config.os }}) needs: - build-ffi - - build-ffi-darwin + - build-ffi-rustup - build-wasm runs-on: ${{ matrix.config.os }} steps: @@ -154,6 +159,7 @@ jobs: go-version-file: 'go.mod' - run: rustup show - uses: Swatinem/rust-cache@v2.7.3 + - run: cargo build -p west-sys - uses: cargo-bins/cargo-binstall@v1.10.5 - run: cargo binstall -y wasm-tools@1.217 - run: cargo test --workspace --all-targets diff --git a/build_dev.go b/build_dev.go index c71c840..44032ae 100644 --- a/build_dev.go +++ b/build_dev.go @@ -6,6 +6,5 @@ package west -// #cgo LDFLAGS: -L${SRCDIR}/target/debug -lwest_sys -// #cgo linux LDFLAGS: -lm +// #cgo LDFLAGS: -L${SRCDIR}/target/debug -lwest_sys import "C"