Skip to content

Commit

Permalink
ubuntu
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz committed Jan 4, 2025
1 parent 9cc8086 commit 358c1e8
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 142 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ on:
type: string
cxx_std:
type: string
batched:
type: string
build_type:
type: string
depcmds:
Expand Down Expand Up @@ -93,6 +95,7 @@ jobs:
OPENIMAGEIO_VERSION: ${{inputs.openimageio_ver}}
PYBIND11_VERSION: ${{inputs.pybind11_ver}}
PYTHON_VERSION: ${{inputs.python_ver}}
USE_BATCHED: ${{inputs.batched}}
ABI_CHECK: ${{inputs.abi_check}}
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
Expand Down Expand Up @@ -144,17 +147,14 @@ jobs:
src/build-scripts/gh-installdeps.bash
elif [[ "$RUNNER_OS" == "macOS" ]]; then
src/build-scripts/install_homebrew_deps.bash
if [[ "$OPENIMAGEIO_VERSION" != "" ]] ; then \
OPENIMAGEIO_CMAKE_FLAGS="-DOIIO_BUILD_TESTS=0 -DUSE_OPENGL=0 -DCMAKE_UNITY_BUILD=ON" ; \
source src/build-scripts/build_openimageio.bash ; \
fi
src/build-scripts/save-env.bash
elif [[ "$RUNNER_OS" == "Windows" ]]; then
src/build-scripts/gh-win-installdeps.bash
fi
if [[ "$OPENIMAGEIO_VERSION" != "" ]] ; then \
OPENIMAGEIO_CMAKE_FLAGS="-DOIIO_BUILD_TESTS=0 -DUSE_OPENGL=0 -DCMAKE_UNITY_BUILD=ON" ; \
source src/build-scripts/build_openimageio.bash ; \
else \
brew install --display-times -q openimageio ; \
PYTHONPATH=$PYTHONPATH:/usr/local/python${PYTHON_VERSION}/site-packages ; \
fi
src/build-scripts/save-env.bash
- name: Install sonar-scanner and build-wrapper
if: inputs.sonar == '1'
uses: sonarsource/sonarcloud-github-c-cpp@e4882e1621ad2fb48dddfa48287411bed34789b1 # v2.0.2
Expand Down
296 changes: 162 additions & 134 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,36 @@ jobs:
build/testsuite/*/*.*
ubuntu:
if: 0
name: "Ubuntu ${{matrix.desc}}"
linux:
name: "${{matrix.desc}}"
uses: ./.github/workflows/build-steps.yml
with:
nametag: ${{ matrix.nametag || 'unnamed!' }}
runner: ${{ matrix.runner || 'ubuntu-latest' }}
container: ${{ matrix.container }}
cc_compiler: ${{ matrix.cc_compiler || 'gcc' }}
cxx_compiler: ${{ matrix.cxx_compiler || 'g++' }}
cxx_std: ${{ matrix.cxx_std || '17' }}
build_type: ${{ matrix.build_type || 'Release' }}
depcmds: ${{ matrix.depcmds }}
extra_artifacts: ${{ matrix.extra_artifacts }}
fmt_ver: ${{ matrix.fmt_ver }}
opencolorio_ver: ${{ matrix.opencolorio_ver }}
openexr_ver: ${{ matrix.openexr_ver }}
openimageio_ver: ${{ matrix.openimageio_ver }}
pybind11_ver: ${{ matrix.pybind11_ver }}
python_ver: ${{ matrix.python_ver }}
setenvs: ${{ matrix.setenvs }}
simd: ${{ matrix.simd }}
skip_build: ${{ matrix.skip_build }}
skip_tests: ${{ matrix.skip_tests }}
abi_check: ${{ matrix.abi_check }}
build_docs: ${{ matrix.build_docs }}
generator: ${{ matrix.generator }}
ctest_args: ${{ matrix.ctest_args }}
ctest_test_timeout: ${{ matrix.ctest_test_timeout || '800' }}
coverage: ${{ matrix.coverage || 0 }}
sonar: ${{ matrix.sonar || 0 }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -581,61 +608,61 @@ jobs:
USE_PYTHON=0
QT_VERSION=0

runs-on: ${{matrix.runner}}
env:
CXX: ${{matrix.cxx_compiler}}
CC: ${{matrix.cc_compiler}}
CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}
FMT_VERSION: ${{matrix.fmt_ver}}
OPENCOLORIO_VERSION: ${{matrix.opencolorio_ver}}
OPENEXR_VERSION: ${{matrix.openexr_ver}}
OPENIMAGEIO_VERSION: ${{matrix.openimageio_ver}}
PYBIND11_VERSION: ${{matrix.pybind11_ver}}
PYTHON_VERSION: ${{matrix.python_ver}}
USE_BATCHED: ${{matrix.batched}}
USE_SIMD: ${{matrix.simd}}
steps:
# We would like to use harden-runner, but it flags too many false
# positives, every time we download a dependency. We should use it only
# on CI runs where we are producing artifacts that users might rely on.
# - name: Harden Runner
# uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813 # v1.4.3
# with:
# egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Prepare ccache timestamp
id: ccache_cache_keys
run: echo "::set-output name=date::`date -u +'%Y-%m-%dT%H:%M:%SZ'`"
- name: ccache
id: ccache
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4
with:
path: /tmp/ccache
key: ${{github.job}}-${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
restore-keys: ${{github.job}}-${{matrix.nametag}}-
- name: Build setup
run: |
${{matrix.setenvs}}
src/build-scripts/ci-startup.bash
- name: Dependencies
run: |
${{matrix.depcmds}}
src/build-scripts/gh-installdeps.bash
- name: Build
run: src/build-scripts/ci-build.bash
- name: Testsuite
if: matrix.skip_tests != '1'
run: src/build-scripts/ci-test.bash
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: failure()
with:
name: osl-${{github.job}}-${{matrix.nametag}}
path: |
build/cmake-save
build/*.cmake
build/CMake*
build/testsuite/*/*.*
${{ matrix.extra_artifacts }}
# runs-on: ${{matrix.runner}}
# env:
# CXX: ${{matrix.cxx_compiler}}
# CC: ${{matrix.cc_compiler}}
# CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}
# FMT_VERSION: ${{matrix.fmt_ver}}
# OPENCOLORIO_VERSION: ${{matrix.opencolorio_ver}}
# OPENEXR_VERSION: ${{matrix.openexr_ver}}
# OPENIMAGEIO_VERSION: ${{matrix.openimageio_ver}}
# PYBIND11_VERSION: ${{matrix.pybind11_ver}}
# PYTHON_VERSION: ${{matrix.python_ver}}
# USE_BATCHED: ${{matrix.batched}}
# USE_SIMD: ${{matrix.simd}}
# steps:
# # We would like to use harden-runner, but it flags too many false
# # positives, every time we download a dependency. We should use it only
# # on CI runs where we are producing artifacts that users might rely on.
# # - name: Harden Runner
# # uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813 # v1.4.3
# # with:
# # egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
# - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
# - name: Prepare ccache timestamp
# id: ccache_cache_keys
# run: echo "::set-output name=date::`date -u +'%Y-%m-%dT%H:%M:%SZ'`"
# - name: ccache
# id: ccache
# uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4
# with:
# path: /tmp/ccache
# key: ${{github.job}}-${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
# restore-keys: ${{github.job}}-${{matrix.nametag}}-
# - name: Build setup
# run: |
# ${{matrix.setenvs}}
# src/build-scripts/ci-startup.bash
# - name: Dependencies
# run: |
# ${{matrix.depcmds}}
# src/build-scripts/gh-installdeps.bash
# - name: Build
# run: src/build-scripts/ci-build.bash
# - name: Testsuite
# if: matrix.skip_tests != '1'
# run: src/build-scripts/ci-test.bash
# - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
# if: failure()
# with:
# name: osl-${{github.job}}-${{matrix.nametag}}
# path: |
# build/cmake-save
# build/*.cmake
# build/CMake*
# build/testsuite/*/*.*
# ${{ matrix.extra_artifacts }}


macos:
Expand All @@ -648,6 +675,7 @@ jobs:
cc_compiler: ${{ matrix.cc_compiler || 'clang' }}
cxx_compiler: ${{ matrix.cxx_compiler || 'clang++' }}
cxx_std: ${{ matrix.cxx_std || '17' }}
batched: ${{ matrix.batched }}
build_type: ${{ matrix.build_type || 'Release' }}
depcmds: ${{ matrix.depcmds }}
extra_artifacts: ${{ matrix.extra_artifacts }}
Expand Down Expand Up @@ -695,80 +723,80 @@ jobs:



macos-old:
name: "${{matrix.runner}} C++${{matrix.cxx_std}} py${{matrix.python_ver}} ${{matrix.desc}}"
strategy:
fail-fast: false
matrix:
include:
- desc: MacOS-13 llvm17
runner: macos-13
nametag: macos13-p311
cc_compiler: /usr/local/opt/llvm/bin/clang
cxx_compiler: /usr/local/opt/llvm/bin/clang++
cxx_std: 17
openimageio_ver: release
python_ver: "3.11"
aclang: 14
setenvs: export DO_BREW_UPDATE=1 CTEST_TEST_TIMEOUT=120
- desc: MacOS-14-ARM llvm17
runner: macos-14
nametag: macos14-arm-p311
cc_compiler: clang
cxx_compiler: clang++
Xcc_compiler: /usr/local/opt/llvm/bin/clang
Xcxx_compiler: /usr/local/opt/llvm/bin/clang++
cxx_std: 17
openimageio_ver: main
python_ver: "3.11"
aclang: 15
setenvs: export DO_BREW_UPDATE=1
# macos-old:
# name: "${{matrix.runner}} C++${{matrix.cxx_std}} py${{matrix.python_ver}} ${{matrix.desc}}"
# strategy:
# fail-fast: false
# matrix:
# include:
# - desc: MacOS-13 llvm17
# runner: macos-13
# nametag: macos13-p311
# cc_compiler: /usr/local/opt/llvm/bin/clang
# cxx_compiler: /usr/local/opt/llvm/bin/clang++
# cxx_std: 17
# openimageio_ver: release
# python_ver: "3.11"
# aclang: 14
# setenvs: export DO_BREW_UPDATE=1 CTEST_TEST_TIMEOUT=120
# - desc: MacOS-14-ARM llvm17
# runner: macos-14
# nametag: macos14-arm-p311
# cc_compiler: clang
# cxx_compiler: clang++
# Xcc_compiler: /usr/local/opt/llvm/bin/clang
# Xcxx_compiler: /usr/local/opt/llvm/bin/clang++
# cxx_std: 17
# openimageio_ver: main
# python_ver: "3.11"
# aclang: 15
# setenvs: export DO_BREW_UPDATE=1

runs-on: ${{matrix.runner}}
env:
CXX: ${{matrix.cxx_compiler}}
CC: ${{matrix.cc_compiler}}
CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}
PYTHON_VERSION: ${{matrix.python_ver}}
OPENIMAGEIO_VERSION: ${{matrix.openimageio_ver}}
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Prepare ccache timestamp
id: ccache_cache_keys
run: echo "::set-output name=date::`date -u +'%Y-%m-%dT%H:%M:%SZ'`"
- name: ccache
id: ccache
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4
with:
path: /Users/runner/.ccache
key: ${{github.job}}-${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
restore-keys: ${{github.job}}-${{matrix.nametag}}-
- name: Build setup
run: |
${{matrix.setenvs}}
src/build-scripts/ci-startup.bash
- name: Dependencies
run: |
source src/build-scripts/install_homebrew_deps.bash
if [[ "$OPENIMAGEIO_VERSION" != "" ]] ; then \
OPENIMAGEIO_CMAKE_FLAGS="-DOIIO_BUILD_TESTS=0 -DUSE_OPENGL=0 -DCMAKE_UNITY_BUILD=ON" ; \
source src/build-scripts/build_openimageio.bash ; \
else \
brew install --display-times -q openimageio ; \
PYTHONPATH=$PYTHONPATH:/usr/local/python${PYTHON_VERSION}/site-packages ; \
fi
src/build-scripts/save-env.bash
- name: Build
run: |
src/build-scripts/ci-build.bash
- name: Testsuite
run: src/build-scripts/ci-test.bash
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: failure()
with:
name: osl-${{github.job}}-${{matrix.nametag}}
path: |
build/cmake-save
build/*.cmake
build/CMake*
build/testsuite/*/*.*
# runs-on: ${{matrix.runner}}
# env:
# CXX: ${{matrix.cxx_compiler}}
# CC: ${{matrix.cc_compiler}}
# CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}
# PYTHON_VERSION: ${{matrix.python_ver}}
# OPENIMAGEIO_VERSION: ${{matrix.openimageio_ver}}
# steps:
# - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
# - name: Prepare ccache timestamp
# id: ccache_cache_keys
# run: echo "::set-output name=date::`date -u +'%Y-%m-%dT%H:%M:%SZ'`"
# - name: ccache
# id: ccache
# uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4
# with:
# path: /Users/runner/.ccache
# key: ${{github.job}}-${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
# restore-keys: ${{github.job}}-${{matrix.nametag}}-
# - name: Build setup
# run: |
# ${{matrix.setenvs}}
# src/build-scripts/ci-startup.bash
# - name: Dependencies
# run: |
# source src/build-scripts/install_homebrew_deps.bash
# if [[ "$OPENIMAGEIO_VERSION" != "" ]] ; then \
# OPENIMAGEIO_CMAKE_FLAGS="-DOIIO_BUILD_TESTS=0 -DUSE_OPENGL=0 -DCMAKE_UNITY_BUILD=ON" ; \
# source src/build-scripts/build_openimageio.bash ; \
# else \
# brew install --display-times -q openimageio ; \
# PYTHONPATH=$PYTHONPATH:/usr/local/python${PYTHON_VERSION}/site-packages ; \
# fi
# src/build-scripts/save-env.bash
# - name: Build
# run: |
# src/build-scripts/ci-build.bash
# - name: Testsuite
# run: src/build-scripts/ci-test.bash
# - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
# if: failure()
# with:
# name: osl-${{github.job}}-${{matrix.nametag}}
# path: |
# build/cmake-save
# build/*.cmake
# build/CMake*
# build/testsuite/*/*.*

0 comments on commit 358c1e8

Please sign in to comment.