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 11, 2024
1 parent cf3b72e commit bc7a3e1
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
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 == 'gcc'
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
2 changes: 1 addition & 1 deletion contrib/curl/lib/config-linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
#define HAVE_GETHOSTBYNAME 1

/* Define to 1 if you have the gethostbyname_r function. */
#if !defined(__OpenBSD__) && !defined(__NetBSD__)
#if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__sun__)
#define HAVE_GETHOSTBYNAME_R 1
#endif

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
4 changes: 3 additions & 1 deletion src/host/os_getversion.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ int getversion(struct OsVersionInfo* info)
info->minorversion = 0;
info->revision = 0;

if (uname(&u))
// uname returns -1 on error, and returns 0 on success for most platforms
// except Solaris, which returns non-negative.
if (uname(&u) < 0)
{
// error
info->description = PLATFORM_OS;
Expand Down

0 comments on commit bc7a3e1

Please sign in to comment.