forked from gear-tech/gear
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.79 KB
/
win.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
name: Win
on: workflow_dispatch
env:
CARGO_TERM_COLOR: always
TERM: xterm-256color
NIGHTLY_TOOLCHAIN_VERSION: ${{ secrets.NIGHTLY_TOOLCHAIN_VERSION }}
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: "Install: Nightly toolchain"
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
- name: "Install: Show specific nightly version"
if: ${{ env.NIGHTLY_TOOLCHAIN_VERSION != '' }}
run: echo $NIGHTLY_TOOLCHAIN_VERSION | sed 's/-/ - /g'
- name: "Install: Specific nightly toolchain"
if: ${{ env.NIGHTLY_TOOLCHAIN_VERSION != '' }}
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-${{ env.NIGHTLY_TOOLCHAIN_VERSION }}
target: wasm32-unknown-unknown
components: llvm-tools-preview
- name: "Install: Pin to specific nightly toolchain"
if: ${{ env.NIGHTLY_TOOLCHAIN_VERSION != '' }}
run: |
rm -r $env:USERPROFILE\.rustup\toolchains\nightly-x86_64-pc-windows-msvc
mv $env:USERPROFILE\.rustup\toolchains\nightly-$env:NIGHTLY_TOOLCHAIN_VERSION-x86_64-pc-windows-msvc $env:USERPROFILE\.rustup\toolchains\nightly-x86_64-pc-windows-msvc
- name: Setup Rust for Win
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: x86_64-pc-windows-msvc
- name: Workaround with libclang.dll
run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
- name: Install LLVM
run: choco install llvm -y
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: -p gear-node --release --target x86_64-pc-windows-msvc