fix rust bindings build on windows (#1584)

Refine rust bindings.
This commit is contained in:
shuffle2
2022-04-16 04:40:04 -07:00
committed by GitHub
parent 9620514b68
commit 2912cd1e29
17 changed files with 268 additions and 320 deletions

View File

@@ -25,22 +25,22 @@ jobs:
fail-fast: false
matrix:
config:
- {
- {
os: windows-2019,
arch: x64,
name: 'Windows x86_64'
}
- {
- {
os: windows-2019,
arch: x86,
name: 'Windows x86'
}
- {
- {
os: ubuntu-latest,
arch: x64,
name: 'Ubuntu x86_64'
}
- {
- {
os: macos-latest,
arch: x64,
name: 'macOS x86_64'
@@ -69,15 +69,13 @@ jobs:
- name: '🚧 Cargo test'
if: "!startsWith(github.ref, 'refs/tags')"
env:
UNICORN_LOCAL: uc
run: |
cd bindings/rust && cargo test
cargo test
- name: '📦 Cargo Publish'
if: startsWith(github.ref, 'refs/tags') && contains(matrix.config.os, 'ubuntu')
env:
TOKEN: ${{ secrets.cratesio_token }}
UNICORN_VERSION: dev
run: |
cd bindings/rust && cargo login $TOKEN && cargo test && cargo publish
cargo login $TOKEN && cargo test && cargo publish