From 7682633e1c02bc3261b15d40fc32d70a02b6c2ff Mon Sep 17 00:00:00 2001 From: Sam Surtees Date: Sun, 8 Dec 2024 16:45:52 +1000 Subject: [PATCH] Add Solaris CI job --- .github/workflows/ci-workflow.yml | 39 +++++++++++++++++++++++++++++++ src/host/os_getnumcpus.c | 4 +++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index b043c674d9..3eb2dc9922 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -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. diff --git a/src/host/os_getnumcpus.c b/src/host/os_getnumcpus.c index 57c478d5ca..17023ba3e7 100644 --- a/src/host/os_getnumcpus.c +++ b/src/host/os_getnumcpus.c @@ -12,8 +12,10 @@ #if PLATFORM_LINUX | PLATFORM_COSMO #include -#elif PLATFORM_SOLARIS | PLATFORM_AIX | PLATFORM_MACOSX | PLATFORM_BSD +#elif PLATFORM_AIX | PLATFORM_MACOSX | PLATFORM_BSD #include +#elif PLATFORM_SOLARIS +#include #elif PLATFORM_WINDOWS #define WIN32_LEAN_AND_MEAN #include