Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
linux:
name: Linux Build & Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Build (Debug 64-bit)
run: make -C projects/make config=debug_64bit

- name: Run tests (Debug)
run: python3 util/test.py --suffix=_d

- name: Build (Release 64-bit)
run: make -C projects/make config=release_64bit

- name: Run tests (Release)
run: python3 util/test.py

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wren-linux
path: |
bin/*
lib/*

macos:
name: macOS Build & Test
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Build (Debug 64-bit)
run: make -C projects/make.mac config=debug_64bit

- name: Run tests (Debug)
run: python3 util/test.py --suffix=_d

- name: Build (Release 64-bit)
run: make -C projects/make.mac config=release_64bit

- name: Run tests (Release)
run: python3 util/test.py

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wren-macos
path: |
bin/*
lib/*

windows:
name: Windows Build & Test
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2

- name: Build (Release 64-bit)
working-directory: projects/vs2019
run: msbuild wren.sln /p:Configuration=Release /p:Platform=64bit

- name: Run tests (Release)
run: python util/test.py

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wren-windows
path: |
bin/*
lib/*
2 changes: 1 addition & 1 deletion src/optional/wren_opt_random.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static void randomSeed0(WrenVM* vm)
{
Well512* well = (Well512*)wrenGetSlotForeign(vm, 0);

srand((uint32_t)time(NULL));
srand((uint32_t)time(NULL) + (uint32_t)clock());
for (int i = 0; i < 16; i++)
{
well->state[i] = rand();
Expand Down