Skip to content

Commit ed344bc

Browse files
committed
Fix samples windows arm64 build
1 parent 04b0e92 commit ed344bc

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,24 @@ jobs:
8888
- name: Test
8989
working-directory: ${{github.workspace}}/build
9090
run: ./bin/${{env.BUILD_TYPE}}/test
91+
92+
build-windows-arm64:
93+
name: windows-arm64
94+
runs-on: windows-11-arm
95+
steps:
96+
97+
- uses: actions/checkout@v4
98+
99+
- name: Configure CMake
100+
run: cmake -A arm64 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBOX2D_SANITIZE=ON -DBUILD_SHARED_LIBS=OFF -DBOX2D_VALIDATE=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
101+
# run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF
102+
103+
- name: Build
104+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
105+
106+
- name: Test
107+
working-directory: ${{github.workspace}}/build
108+
run: ./bin/${{env.BUILD_TYPE}}/test
91109

92110
samples-windows-static:
93111
name: samples-windows-static
@@ -109,6 +127,21 @@ jobs:
109127
- name: Build
110128
run: cmake --build ${{github.workspace}}/build --config Release
111129

130+
samples-windows-arm64-static:
131+
name: samples-windows-arm64-static
132+
runs-on: windows-11-arm
133+
timeout-minutes: 6
134+
if: github.event_name == 'push' || github.event.pull_request.draft == false
135+
steps:
136+
137+
- uses: actions/checkout@v4
138+
139+
- name: Configure CMake
140+
run: cmake -A arm64 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DBOX2D_SAMPLES=ON -DBUILD_SHARED_LIBS=OFF -DBOX2D_UNIT_TESTS=OFF
141+
142+
- name: Build
143+
run: cmake --build ${{github.workspace}}/build --config Release
144+
112145
samples-windows-dynamic:
113146
name: samples-windows-dynamic
114147
runs-on: windows-latest

samples/sample_benchmark.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <stdint.h>
1717
#include <vector>
1818

19-
#if defined( _MSC_VER )
19+
#if defined( _MSC_VER ) && !defined( _M_ARM64 )
2020
#include <intrin.h>
2121
#define GET_CYCLES __rdtsc()
2222
#else

0 commit comments

Comments
 (0)