@@ -41,29 +41,50 @@ jobs:
41
41
extra_setup : |
42
42
rustup target add x86_64-apple-darwin
43
43
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
44
55
45
56
steps :
46
57
- uses : actions/checkout@v4
47
58
- name : Install cargo and setup
59
+ if : runner.os == 'Linux'
48
60
shell : bash
49
61
run : |
50
62
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
51
63
curl https://sh.rustup.rs -sSf | sh -s -- -y
52
64
source "$HOME/.cargo/env"
53
65
54
66
- name : Build ${{ matrix.output_name }}
67
+ if : runner.os == 'Linux'
55
68
shell : bash
56
69
run : |
57
70
${{ matrix.extra_setup }}
58
71
cargo build --profile maxperf --target=${{ matrix.rust_target }} -p ${{ matrix.workspace }}
59
72
mv target/${{ matrix.rust_target }}/maxperf/${{ matrix.workspace }} target/${{ matrix.rust_target }}/maxperf/${{ matrix.output_name }}
60
73
pushd target/${{ matrix.rust_target }}/maxperf/
61
74
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
63
84
64
85
- uses : actions/upload-artifact@v4
65
86
with :
66
- name : binaries/ ${{ matrix.output_name }}
87
+ name : ${{ matrix.output_name }}
67
88
path : target/${{ matrix.rust_target }}/maxperf/${{ matrix.output_name }}.tar.gz
68
89
69
90
binary_publish :
73
94
- uses : actions/download-artifact@v4
74
95
with :
75
96
path : binaries
97
+ pattern : avail-light*
76
98
merge-multiple : true
77
99
78
100
- run : ls -R binaries
0 commit comments