Skip to content

Commit

Permalink
ci: use rustup on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Sep 18, 2024
1 parent 609ddb9 commit baf0ae4
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -109,7 +113,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:
Expand All @@ -134,7 +138,7 @@ jobs:
env:
GOGC: 1
WEST_LOG: trace
continue-on-error: ${{ matrix.config.os == 'ubuntu-latest' }} # TODO: remove
continue-on-error: matrix.config.os == 'ubuntu-latest' # TODO: remove
- run: git diff --exit-code

test-dev:
Expand All @@ -152,6 +156,13 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- uses: msys2/setup-msys2@v2
if: matrix.os == 'windows-latest'
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain
path-type: inherit
- run: rustup show
- uses: Swatinem/[email protected]
- uses: cargo-bins/[email protected]
Expand All @@ -162,7 +173,7 @@ jobs:
env:
GOGC: 1
WEST_LOG: trace
continue-on-error: ${{ matrix.os == 'ubuntu-latest' }} # TODO: remove
continue-on-error: matrix.os == 'ubuntu-latest' # TODO: remove
- run: git diff --exit-code

gofmt:
Expand Down Expand Up @@ -226,13 +237,13 @@ jobs:
- name: dry-run publish ${{ matrix.crate }} to crates.io
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
continue-on-error: ${{ matrix.workspace-dependencies }} # publish may fail due to workspace crates not being published yet
continue-on-error: matrix.workspace-dependencies # publish may fail due to workspace crates not being published yet
run: cargo publish --dry-run
working-directory: ./crates/${{ matrix.crate }}

- name: publish ${{ matrix.crate }} to crates.io
if: startsWith(github.ref, format('refs/tags/crates/{0}/v', matrix.crate)) && !steps.ctx.outputs.prerelease
continue-on-error: ${{ github.repository_owner != 'rvolosatovs' }}
continue-on-error: github.repository_owner != 'rvolosatovs'
run: |
pkgver=$(cargo pkgid | cut -d '@' -f 2)
tagver="${{ steps.ctx.outputs.version }}"
Expand Down

0 comments on commit baf0ae4

Please sign in to comment.