-
Notifications
You must be signed in to change notification settings - Fork 113
58 lines (50 loc) · 1.45 KB
/
windows.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: Windows
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
target:
#- i686-pc-windows-gnu
- i686-pc-windows-msvc
#- x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
channel: [ stable ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: setup
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.channel }}-${{ matrix.target }}
targets: ${{ matrix.target }}
- name: Add mingw32 to path for i686-gnu
run: |
echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH
echo "C:\msys64\usr\bin" >> $GITHUB_PATH
if: matrix.target == 'i686-pc-windows-gnu'
shell: bash
- name: Add mingw64 to path for x86_64-gnu
run: |
echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
echo "C:\msys64\usr\bin" >> $GITHUB_PATH
if: matrix.target == 'x86_64-pc-windows-gnu'
shell: bash
- name: Update gcc
if: matrix.target == 'x86_64-pc-windows-gnu'
run: pacman.exe -Sy --noconfirm mingw-w64-x86_64-toolchain
- name: Update gcc
if: matrix.target == 'i686-pc-windows-gnu'
run: pacman.exe -Sy --noconfirm mingw-w64-i686-toolchain
- name: Build
run: cargo build --verbose --verbose
- name: Run tests
run: cargo test --verbose