Skip to content

Commit e668efa

Browse files
committed
windows build
1 parent e331575 commit e668efa

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
version: ${{ env.ZIG_VERSION }}
3030

3131
- name: Install system dependencies
32+
shell: bash
3233
run: |
3334
echo "🔧 Installing system dependencies for ${{ runner.os }}..."
3435
case "${{ runner.os }}" in
@@ -106,6 +107,7 @@ jobs:
106107
version: ${{ matrix.zig-version }}
107108

108109
- name: Install system dependencies
110+
shell: bash
109111
run: |
110112
echo "🔧 Installing system dependencies for ${{ runner.os }}..."
111113
case "${{ runner.os }}" in
@@ -145,12 +147,14 @@ jobs:
145147
${{ runner.os }}-zig-${{ matrix.zig-version }}-
146148
147149
- name: Build project
150+
shell: bash
148151
run: |
149152
echo "🔨 Building Ora compiler..."
150153
zig build
151154
echo "✅ Build successful"
152155
153156
- name: Run tests
157+
shell: bash
154158
run: |
155159
echo "🧪 Running test suite..."
156160
zig test src/lexer.zig || echo "⚠️ Lexer tests failed"
@@ -164,6 +168,7 @@ jobs:
164168
echo "✅ Test suite completed"
165169
166170
- name: Test individual components
171+
shell: bash
167172
run: |
168173
echo "🔧 Testing individual components..."
169174
zig build-lib src/lexer.zig && echo "✅ Lexer compiles"
@@ -176,6 +181,7 @@ jobs:
176181
zig build-lib src/formal_verifier.zig && echo "✅ Formal verifier compiles"
177182
178183
- name: Clean up build artifacts
184+
shell: bash
179185
run: |
180186
rm -f lib*.a lib*.a.o
181187
@@ -196,6 +202,7 @@ jobs:
196202
version: ${{ env.ZIG_VERSION }}
197203

198204
- name: Install system dependencies
205+
shell: bash
199206
run: |
200207
echo "🔧 Installing system dependencies for ${{ runner.os }}..."
201208
case "${{ runner.os }}" in
@@ -235,6 +242,7 @@ jobs:
235242
${{ runner.os }}-zig-${{ env.ZIG_VERSION }}-
236243
237244
- name: Build examples
245+
shell: bash
238246
run: |
239247
echo "📚 Building examples..."
240248
zig build
@@ -272,7 +280,7 @@ jobs:
272280

273281
strategy:
274282
matrix:
275-
os: [ubuntu-latest, macos-latest]
283+
os: [ubuntu-latest, macos-latest, windows-latest]
276284

277285
steps:
278286
- name: Checkout code
@@ -286,6 +294,7 @@ jobs:
286294
version: ${{ env.ZIG_VERSION }}
287295

288296
- name: Install system dependencies
297+
shell: bash
289298
run: |
290299
echo "🔧 Installing system dependencies for ${{ runner.os }}..."
291300
case "${{ runner.os }}" in
@@ -325,11 +334,13 @@ jobs:
325334
${{ runner.os }}-zig-${{ env.ZIG_VERSION }}-
326335
327336
- name: Run struct tests
337+
shell: bash
328338
run: |
329339
echo "🏗️ Running comprehensive struct tests..."
330340
./scripts/test-struct-examples.sh
331341
332342
- name: Run struct performance benchmarks
343+
shell: bash
333344
run: |
334345
echo "⚡ Running struct performance benchmarks..."
335346
./scripts/test-struct-examples.sh --benchmark
@@ -363,11 +374,13 @@ jobs:
363374
submodules: recursive
364375

365376
- name: Run security scan
377+
shell: bash
366378
run: |
367379
echo "🔍 Running basic security scan..."
368380
# Basic security checks - more comprehensive scans in security.yml
369381
370382
- name: Check for security issues
383+
shell: bash
371384
run: |
372385
echo "🔒 Running security checks..."
373386
@@ -406,6 +419,7 @@ jobs:
406419
version: ${{ env.ZIG_VERSION }}
407420

408421
- name: Install system dependencies
422+
shell: bash
409423
run: |
410424
echo "🔧 Installing system dependencies for ${{ runner.os }}..."
411425
case "${{ runner.os }}" in
@@ -445,11 +459,13 @@ jobs:
445459
${{ runner.os }}-zig-${{ env.ZIG_VERSION }}-
446460
447461
- name: Build with optimizations
462+
shell: bash
448463
run: |
449464
echo "🚀 Building optimized version..."
450465
zig build -Doptimize=ReleaseFast
451466
452467
- name: Run performance tests
468+
shell: bash
453469
run: |
454470
echo "⚡ Running performance benchmarks..."
455471
@@ -483,6 +499,7 @@ jobs:
483499
version: ${{ env.ZIG_VERSION }}
484500

485501
- name: Install system dependencies
502+
shell: bash
486503
run: |
487504
echo "🔧 Installing system dependencies for ${{ runner.os }}..."
488505
case "${{ runner.os }}" in
@@ -512,6 +529,7 @@ jobs:
512529
esac
513530
514531
- name: Build release version
532+
shell: bash
515533
run: |
516534
echo "🎯 Building release version..."
517535
zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux
@@ -520,6 +538,7 @@ jobs:
520538
echo "✅ Release builds completed"
521539
522540
- name: Create release summary
541+
shell: bash
523542
run: |
524543
echo "📋 Release Summary:" > release-summary.md
525544
echo "- Commit: ${{ github.sha }}" >> release-summary.md

build.zig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,11 @@ fn buildSolidityLibrariesImpl(step: *std.Build.Step, options: std.Build.Step.Mak
306306
std.log.info("Adding Boost paths for Apple Silicon Mac", .{});
307307
// macOS already uses libc++ by default, but be explicit
308308
try cmake_args.append("-DCMAKE_CXX_FLAGS=-stdlib=libc++");
309+
} else if (builtin.os.tag == .windows) {
310+
std.log.info("Adding Boost paths for Windows", .{});
311+
// Windows: Use MSVC by default, but ensure release mode
312+
try cmake_args.append("-DCMAKE_CXX_FLAGS=/std:c++20");
313+
try cmake_args.append("-DBOOST_ROOT=C:/tools/boost");
309314
}
310315

311316
// Configure CMake

0 commit comments

Comments
 (0)