Skip to content

Commit d8a2ef2

Browse files
committed
Added a build-windows.yml workflow.
1 parent bf25e75 commit d8a2ef2

File tree

1 file changed

+114
-0
lines changed

1 file changed

+114
-0
lines changed
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: build and test windows
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build-examples:
13+
runs-on: windows-latest
14+
15+
steps:
16+
# Step 1: Checkout the repository
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
# Step 2: Move to the parent directory and fetch dependencies
21+
- name: Fetch dependencies
22+
run: |
23+
cd ..
24+
git clone https://github.com/razterizer/Core.git
25+
26+
# Step 3: Change to the correct directory and build
27+
- name: Build
28+
run: |
29+
cd Examples
30+
./build_examples.bat
31+
continue-on-error: false # Ensure errors are not bypassed
32+
33+
build-examples-with-locked-dependencies:
34+
runs-on: windows-latest
35+
36+
steps:
37+
# Step 1: Checkout the repository
38+
- name: Checkout repository
39+
uses: actions/checkout@v4
40+
41+
# Step 2: Move to the parent directory and fetch dependencies
42+
- name: Fetch dependencies
43+
run: |
44+
cd ..
45+
./Termin8or/fetch-dependencies.py Termin8or/dependencies -y
46+
47+
# Step 3: Change to the correct directory and build
48+
- name: Build
49+
run: |
50+
cd Examples
51+
./build_examples.bat
52+
continue-on-error: false # Ensure errors are not bypassed
53+
54+
build-unit-tests:
55+
runs-on: windows-latest
56+
57+
steps:
58+
# Step 1: Checkout the repository
59+
- name: Checkout repository
60+
uses: actions/checkout@v4
61+
62+
# Step 2: Move to the parent directory and fetch dependencies
63+
- name: Fetch dependencies
64+
run: |
65+
cd ..
66+
git clone https://github.com/razterizer/Core.git
67+
68+
# Step 3: Change to the correct directory and build
69+
- name: Build
70+
run: |
71+
cd Tests
72+
./build_unit_tests.bat
73+
continue-on-error: false # Ensure errors are not bypassed
74+
75+
# Step 4: Upload the built unit test binaries as artifacts
76+
- name: Upload unit test binaries
77+
uses: actions/upload-artifact@v4
78+
with:
79+
name: unit-test-artifacts
80+
path: Tests/x64/Release
81+
82+
run-unit-tests:
83+
needs: build-unit-tests
84+
runs-on: windows-latest
85+
86+
steps:
87+
# Step 1: Checkout the repository
88+
- name: Checkout repository
89+
uses: actions/checkout@v4
90+
91+
- name: List files
92+
run: |
93+
pwd
94+
ls
95+
96+
# Step 2: Create the bin folder if it doesn't exist
97+
- name: Create bin folder
98+
run: mkdir -p Tests/bin
99+
100+
# Step 3: Download the artifacts from the previous job
101+
- name: Download unit test binaries
102+
uses: actions/download-artifact@v4
103+
with:
104+
name: unit-test-artifacts
105+
path: Tests/x64/Release
106+
107+
# Step 4: Run the unit tests
108+
- name: Run unit tests
109+
run: |
110+
cd Tests
111+
./x64/Release/unit_tests
112+
continue-on-error: false # Ensure errors are not bypassed
113+
114+

0 commit comments

Comments
 (0)