-
Notifications
You must be signed in to change notification settings - Fork 41
70 lines (63 loc) · 2.2 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build All
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Setup rust toolchain
uses: actions-rs/[email protected]
with:
toolchain: nightly
components: rustfmt, clippy
default: true
override: true
- name: Add wasm cargo target
run: rustup target add wasm32-unknown-unknown
- name: Build C Driver
run: |
msbuild.exe C/STrace.sln /m /verbosity:minimal /t:Rebuild /p:Configuration=Debug /p:Platform=x64
msbuild.exe C/STrace.sln /m /verbosity:minimal /t:Rebuild /p:Configuration=Release /p:Platform=x64
- name: Build Wasm
run: |
cd Rust/WasmScript
cargo build
cargo build --release
cd ../../
cd Rust/WasmTester
cargo build
cargo build --release
- name: Build Rust Driver
run: |
cd Rust/Driver
cargo build
cargo build --release
- name: Zip Build
run: |
cd Rust/Driver
Get-ChildItem -exclude target | Remove-Item -Force -Recurse -Confirm:$false
cd target
Get-ChildItem -exclude x86_64-pc-windows-msvc | Remove-Item -Force -Recurse -Confirm:$false
cd ../../../
cd Rust/WasmTester
Get-ChildItem -exclude target | Remove-Item -Force -Recurse -Confirm:$false
cd target
Get-ChildItem -exclude release, debug | Remove-Item -Force -Recurse -Confirm:$false
cd ../../../
cd Rust/WasmScript
Get-ChildItem -exclude target | Remove-Item -Force -Recurse -Confirm:$false
cd target
Get-ChildItem -exclude wasm32-unknown-unknown | Remove-Item -Force -Recurse -Confirm:$false
cd ../../../
cd C/
Get-ChildItem -exclude x64 | Remove-Item -Force -Recurse -Confirm:$false
cd ../
Compress-Archive -DestinationPath STrace.zip -Path Rust, C, install -CompressionLevel Fastest
- name: Release
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: STrace.zip