Skip to content

Commit

Permalink
Add Solaris CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
samsinsane committed Dec 10, 2024
1 parent ae52ec3 commit 7682633
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,45 @@ jobs:
run: |
cd $GITHUB_WORKSPACE
bin/${{ matrix.config }}/premake5 docs-check
solaris:
runs-on: ubuntu-latest
strategy:
matrix:
config: [debug, release]
platform: [x64]
cc: [gcc]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Start Solaris VM
uses: vmactions/solaris-vm@v1
with:
usesh: true
#sync: sshfs
cpu: 4
mem: 8192
release: 11.4-gcc
- name: Build
shell: solaris {0}
run: |
cd $GITHUB_WORKSPACE
CC=${{ matrix.cc }} PLATFORM=${{ matrix.platform }} CONFIG=${{ matrix.config }} PREMAKE_OPTS="--cc=${{ matrix.cc }}" ./Bootstrap.sh
- name: Test
shell: solaris {0}
run: |
cd $GITHUB_WORKSPACE
bin/${{ matrix.config }}/premake5 test --test-all
- name: Docs check
shell: solaris {0}
run: |
cd $GITHUB_WORKSPACE
bin/${{ matrix.config }}/premake5 docs-check
- name: Upload Artifacts
if: matrix.config == 'release' && matrix.cc == 'clang'
uses: actions/upload-artifact@v4
with:
name: premake-solaris-${{ matrix.platform }}
path: bin/${{ matrix.config }}/

# This job will be required for PRs to be merged.
# This should depend on (via needs) all jobs that need to be successful for the PR to be merged.
Expand Down
4 changes: 3 additions & 1 deletion src/host/os_getnumcpus.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@

#if PLATFORM_LINUX | PLATFORM_COSMO
#include <sched.h>
#elif PLATFORM_SOLARIS | PLATFORM_AIX | PLATFORM_MACOSX | PLATFORM_BSD
#elif PLATFORM_AIX | PLATFORM_MACOSX | PLATFORM_BSD
#include <sys/sysctl.h>
#elif PLATFORM_SOLARIS
#include <unistd.h>
#elif PLATFORM_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
Expand Down

0 comments on commit 7682633

Please sign in to comment.