Skip to content

Commit

Permalink
FreeBSD compatibility patch (#145)
Browse files Browse the repository at this point in the history
* FreeBSD compatibility patch

* add github workflow using FreeBSD in VM

---------

Co-authored-by: Michael Smith <miksmith@attglobal.net>
Co-authored-by: michaeldsmith <37905569+michaeldsmith@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 7, 2024
1 parent 0b32a00 commit 972d0ab
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/freebsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: FreeBSD

on:
push:
paths-ignore:
- 'README.md'
- 'doc/**'
pull_request:
paths-ignore:
- 'README.md'
- 'doc/**'

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug

jobs:

setup-freeBSD:

runs-on: ubuntu-latest
# based on example from https://github.com/marketplace/actions/freebsd-vm
steps:
- uses: actions/checkout@v4
- name: setup FreeBSD on github runner
id: test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y curl
run: |
pwd
ls -lah
whoami
env
freebsd-version
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: do CI on FreeBSD VM on github runner
id: test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y cmake
pkg install -y openexr
pkg install -y tiff
run: |
mkdir build &&
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} &&
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: do CI on FreeBSD VM on github runner
id: test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y cmake
pkg install -y openexr
pkg install -y tiff
run: |
mkdir build &&
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} &&
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} &&
cd build &&
ctest -V --output-on-failure
2 changes: 2 additions & 0 deletions ctlrender/tiff_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
#include <Iex.h>
#ifdef _WIN32
#include <malloc.h>
#elif defined(__FreeBSD__)
#include <stdlib.h>
#else
#include <alloca.h>
#endif
Expand Down
2 changes: 2 additions & 0 deletions lib/IlmCtl/CtlExc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
#include <stdio.h>
#ifdef _WIN32
#include <malloc.h>
#elif defined(__FreeBSD__)
#include <stdlib.h>
#else
#include <alloca.h>
#endif
Expand Down
2 changes: 2 additions & 0 deletions lib/IlmCtl/CtlTypeStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
#include <string.h>
#ifdef _WIN32
#include <malloc.h>
#elif defined(__FreeBSD__)
#include <stdlib.h>
#else
#include <alloca.h>
#endif
Expand Down
2 changes: 2 additions & 0 deletions lib/dpx/dpx_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
#include <stdio.h>
#ifdef _WIN32
#include <malloc.h>
#elif defined(__FreeBSD__)
#include <stdlib.h>
#else
#include <alloca.h>
#endif
Expand Down

0 comments on commit 972d0ab

Please sign in to comment.