Skip to content

Run tests in CI on both Windows and Linux - #3538

Open
yel0h wants to merge 6 commits into
PixelGuys:masterfrom
yel0h:run-tests-in-ci
Open

Run tests in CI on both Windows and Linux#3538
yel0h wants to merge 6 commits into
PixelGuys:masterfrom
yel0h:run-tests-in-ci

Conversation

@yel0h

@yel0h yel0h commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Split the CI workflow's zig build test step out of the compile job into its own test job that runs on a matrix, so unit tests execute on both operating systems.

Closes #3535

@Wunka Wunka moved this to Easy to Review in PRs to review Aug 21, 2026
@IntegratedQuantum

Copy link
Copy Markdown
Member

Would you mind also checking if we can get it running on macos as well?

@yel0h

yel0h commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

We sure can, however currently Mac fails to compile due to #3541

@IntegratedQuantum

Copy link
Copy Markdown
Member

Alright, then lets do it without macos first, it's good to know that it's at least possible in principle

@IntegratedQuantum IntegratedQuantum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, after seeing that each of them takes several minutes again (whereas in the main CI job it took only a few seconds to compile and run the tests), I think we should do the platform specific compilation in the same CI unit as the tests, to avoid duplicated dependency downloads.

The main CI unit would then only do the format checking and shader compilation

@yel0h

yel0h commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Done

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
Comment on lines +55 to +58
- if: matrix.os == 'ubuntu-latest'
run: zig build -Dtarget=aarch64-linux-gnu
- if: matrix.os == 'windows-latest'
run: zig build -Dtarget=aarch64-windows-gnu

@Wunka Wunka Aug 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you not just use:

Suggested change
- if: matrix.os == 'ubuntu-latest'
run: zig build -Dtarget=aarch64-linux-gnu
- if: matrix.os == 'windows-latest'
run: zig build -Dtarget=aarch64-windows-gnu
run: zig build -Dtarget=aarch64-native-gnu

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's possible we should also change the default one to -Dtarget=x86_64-native

@yel0h

yel0h commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Ok, replaced the ifs with a native target

Comment thread .github/workflows/ci.yml
with:
version: ${{ env.VERSION }}
- run: zig build -Dtarget=x86_64-native
- run: zig build -Dtarget=aarch64-native-gnu

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gnu shouldn't be needed here. It also would be incorrect when we want to extend this for macos.

@yel0h

yel0h commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

Unfortunately it seems gnu needs to say, leaving it out tries to use the native x86_64 headers...

@IntegratedQuantum

Copy link
Copy Markdown
Member

Ah I see, I guess we will need to go back to ifs once we implement macos then. Either way it's probably fine for now.

Though it seems that the CI is failing now, not sure why. I also tried restarting it with the same results. Please investigate.

@IntegratedQuantum IntegratedQuantum moved this from Easy to Review to In review in PRs to review Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Run the tests in the CI both on Windows and on Linux

3 participants