Skip to content

Commit 49d0c80

Browse files
committed
test matrix builds
1 parent 2cec6de commit 49d0c80

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,50 @@ jobs:
4141
extra_setup: |
4242
rustup target add x86_64-apple-darwin
4343
44+
- os: windows-latest
45+
workspace: avail-light
46+
rust_target: i686-pc-windows-msvc
47+
output_name: avail-light-windows-i686
48+
extra_setup: |
49+
Invoke-WebRequest -Uri https://win.rustup.rs -OutFile rustup-init.exe
50+
.\rustup-init.exe -y --default-toolchain stable
51+
$env:Path += ";$env:USERPROFILE\.cargo\bin"
52+
rustup --version
53+
cargo --version
54+
rustup target add i686-pc-windows-msvc
4455
4556
steps:
4657
- uses: actions/checkout@v4
4758
- name: Install cargo and setup
59+
if: runner.os == 'Linux'
4860
shell: bash
4961
run: |
5062
sudo apt-get update && sudo apt-get install -y librust-openssl-dev build-essential protobuf-compiler musl-tools clang libc6-dev libc6-dev-arm64-cross libssl-dev pkg-config
5163
curl https://sh.rustup.rs -sSf | sh -s -- -y
5264
source "$HOME/.cargo/env"
5365
5466
- name: Build ${{ matrix.output_name }}
67+
if: runner.os == 'Linux'
5568
shell: bash
5669
run: |
5770
${{ matrix.extra_setup }}
5871
cargo build --profile maxperf --target=${{ matrix.rust_target }} -p ${{ matrix.workspace }}
5972
mv target/${{ matrix.rust_target }}/maxperf/${{ matrix.workspace }} target/${{ matrix.rust_target }}/maxperf/${{ matrix.output_name }}
6073
pushd target/${{ matrix.rust_target }}/maxperf/
6174
tar czf ${{ matrix.output_name }}.tar.gz ${{ matrix.output_name }}
62-
popd
75+
76+
- name: Build ${{ matrix.output_name }}
77+
if: runner.os == 'Windows'
78+
shell: pwsh
79+
run: |
80+
${{ matrix.extra_setup }}
81+
cargo build --profile maxperf --target=${{ matrix.rust_target }} -p ${{ matrix.workspace }}
82+
Move-Item -Path "target\${{ matrix.rust_target }}\maxperf\${{ matrix.workspace }}" -Destination "target\${{ matrix.rust_target }}\maxperf\${{ matrix.output_name }}"
83+
Compress-Archive -Path "${{ matrix.output_name }}" -DestinationPath "${{ matrix.output_name }}.tar.gz
6384
6485
- uses: actions/upload-artifact@v4
6586
with:
66-
name: binaries/${{ matrix.output_name }}
87+
name: ${{ matrix.output_name }}
6788
path: target/${{ matrix.rust_target }}/maxperf/${{ matrix.output_name }}.tar.gz
6889

6990
binary_publish:
@@ -73,6 +94,7 @@ jobs:
7394
- uses: actions/download-artifact@v4
7495
with:
7596
path: binaries
97+
pattern: avail-light*
7698
merge-multiple: true
7799

78100
- run: ls -R binaries

0 commit comments

Comments
 (0)