|
33 | 33 | - os: ubuntu-latest |
34 | 34 | target_arch: aarch64-unknown-linux-gnu |
35 | 35 | arch: arm64-linux |
| 36 | + - os: windows-latest |
| 37 | + target_arch: x86_64-pc-windows-msvc |
| 38 | + arch: x86_64-windows |
| 39 | + - os: windows-latest |
| 40 | + target_arch: i686-pc-windows-msvc |
| 41 | + arch: i686-windows |
| 42 | + - os: windows-latest |
| 43 | + target_arch: aarch64-pc-windows-msvc |
| 44 | + arch: arm64-windows |
36 | 45 |
|
37 | 46 | steps: |
38 | 47 | - name: Checkout sources |
@@ -68,11 +77,23 @@ jobs: |
68 | 77 | CARGO_C_VERSION: v0.10.13 |
69 | 78 | run: | |
70 | 79 | curl -L $LINK/$CARGO_C_VERSION/$CARGO_C_FILE | tar xz -C ~/.cargo/bin |
| 80 | + - name: Install cargo-c (Windows) |
| 81 | + if: matrix.os == 'windows-latest' |
| 82 | + env: |
| 83 | + LINK: https://github.com/lu-zero/cargo-c/releases/download |
| 84 | + CARGO_C_FILE: cargo-c-windows-msvc.zip |
| 85 | + CARGO_C_VERSION: v0.10.13 |
| 86 | + shell: cmd |
| 87 | + run: | |
| 88 | + curl -L %LINK%/%CARGO_C_VERSION%/%CARGO_C_FILE% -o %TEMP%\%CARGO_C_FILE% |
| 89 | + tar xzf %TEMP%\%CARGO_C_FILE% -C %USERPROFILE%\.cargo\bin |
| 90 | + del %TEMP%\%CARGO_C_FILE% |
71 | 91 | - name: Run cargo-c tests |
72 | 92 | run: cargo ctest --release --features="capi" |
73 | 93 | if: matrix.os == 'ubuntu-latest' && matrix.target_arch == 'x86_64-unknown-linux-gnu' |
74 | 94 |
|
75 | 95 | - name: Build C-API |
| 96 | + shell: bash |
76 | 97 | run: | |
77 | 98 | cargo cinstall --target ${{ matrix.target_arch }} \ |
78 | 99 | --prefix=/usr \ |
|
83 | 104 | run: tar cvzf biscuit-auth-${{github.ref_name}}-${{matrix.arch}}.tar.gz -C build/ . |
84 | 105 |
|
85 | 106 | - name: Generate checksum |
| 107 | + shell: bash |
86 | 108 | run: | |
87 | | - if [[ "$RUNNER_OS" == "Linux" ]]; then |
| 109 | + if [[ "$RUNNER_OS" == "Linux" || "$RUNNER_OS" == "Windows" ]]; then |
88 | 110 | sha256sum "biscuit-auth-${{github.ref_name}}-${{matrix.arch}}.tar.gz" > "biscuit-auth-${{github.ref_name}}-${{matrix.arch}}.tar.gz.sha256" |
89 | 111 | else |
90 | 112 | shasum -a 256 "biscuit-auth-${{github.ref_name}}-${{matrix.arch}}.tar.gz" > "biscuit-auth-${{github.ref_name}}-${{matrix.arch}}.tar.gz.sha256" |
|
0 commit comments