Skip to content

Commit b0d7b52

Browse files
committed
[CI] Test compilation on Windows
1 parent e5563b5 commit b0d7b52

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/main.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,63 @@ jobs:
8787
with:
8888
name: cg_clif-${{ runner.os }}-cross-x86_64-mingw
8989
path: cg_clif.tar.xz
90+
91+
build_windows:
92+
runs-on: windows-latest
93+
timeout-minutes: 60
94+
95+
steps:
96+
- uses: actions/checkout@v2
97+
98+
#- name: Cache cargo installed crates
99+
# uses: actions/cache@v2
100+
# with:
101+
# path: ~/.cargo/bin
102+
# key: ${{ runner.os }}-cargo-installed-crates
103+
104+
#- name: Cache cargo registry and index
105+
# uses: actions/cache@v2
106+
# with:
107+
# path: |
108+
# ~/.cargo/registry
109+
# ~/.cargo/git
110+
# key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
111+
112+
#- name: Cache cargo target dir
113+
# uses: actions/cache@v2
114+
# with:
115+
# path: target
116+
# key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
117+
118+
- name: Prepare dependencies
119+
run: |
120+
git config --global user.email "[email protected]"
121+
git config --global user.name "User"
122+
git config --global core.autocrlf false
123+
rustup set default-host x86_64-pc-windows-gnu
124+
rustc y.rs -o y.exe -g
125+
./y.exe prepare
126+
127+
- name: Build
128+
#name: Test
129+
run: |
130+
# Enable backtraces for easier debugging
131+
#export RUST_BACKTRACE=1
132+
133+
# Reduce amount of benchmark runs as they are slow
134+
#export COMPILE_RUNS=2
135+
#export RUN_RUNS=2
136+
137+
# Enable extra checks
138+
#export CG_CLIF_ENABLE_VERIFIER=1
139+
140+
./y.exe build
141+
142+
#- name: Package prebuilt cg_clif
143+
# run: tar cvfJ cg_clif.tar.xz build
144+
145+
#- name: Upload prebuilt cg_clif
146+
# uses: actions/upload-artifact@v2
147+
# with:
148+
# name: cg_clif-${{ runner.os }}
149+
# path: cg_clif.tar.xz

0 commit comments

Comments
 (0)