Add CMAKE_POSITION_INDEPENDENT_CODE=ON to buildscripts #4464
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push] | |
env: | |
OSC_BUILD_ID: "GITHUB_${{ github.run_id }}.${{ github.run_number }}" | |
jobs: | |
windows2022msvc: | |
name: Windows 2022 (x86_64, MSVC) | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: osc | |
submodules: 'recursive' | |
- name: run build_windows.py | |
run: | | |
cd $env:GITHUB_WORKSPACE\osc | |
pip install pytest | |
python scripts\\build_windows.py -j2 || exit /b | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: OpenSimCreator_Win64.zip | |
path: osc/osc-build/*win64.exe | |
if-no-files-found: error | |
ubuntu2004clang: | |
name: Ubuntu 20.04 (x86_64, clang) | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: osc | |
submodules: 'recursive' | |
- name: setup system | |
run: | | |
sudo apt-get install -y build-essential cmake libgtk-3-dev liblapack-dev python3-dev python3-pytest | |
sudo apt-get install -y xvfb # virtual desktop, for tests | |
- name: run build script | |
run: | | |
cd $GITHUB_WORKSPACE/osc | |
export OSC_BUILD_CONCURRENCY=$(nproc) | |
export CC=clang | |
export CXX=clang++ | |
xvfb-run ./scripts/build_ubuntu-20.04.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: OpenSimCreator_Deb.zip | |
path: osc/osc-build/*.deb | |
if-no-files-found: error | |
macos11clang: | |
name: MacOS 13 (x86_64, XCode 15.2, targeting 14.2) | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: run build script | |
run: | | |
cd $GITHUB_WORKSPACE | |
python3 -m venv venv | |
source venv/bin/activate | |
pip install pytest | |
OSC_CMAKE_CONFIG_EXTRA="-Werror=dev -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=14 -DCMAKE_OSX_ARCHITECTURES=x86_64" | |
export OSC_BUILD_CONCURRENCY=$(sysctl -n hw.physicalcpu) | |
./scripts/build_mac.sh | |
./scripts/macos_check-dependencies.py osc-build/osc/osc | |
./scripts/macos_check-sdk.py 14.2 osc-build/osc/osc | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: OpenSimCreator_MacOSX.zip | |
path: osc-build/*.dmg | |
if-no-files-found: error | |
ubuntu2204gcc: | |
name: Ubuntu 22.04 (x86_64, gcc-12) | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: osc | |
submodules: 'recursive' | |
- name: setup system | |
run: | | |
sudo apt-get install -y build-essential cmake libgtk-3-dev liblapack-dev python3-dev python3-pytest | |
sudo apt-get install -y xvfb # virtual desktop, for tests | |
- name: run build script | |
run: | | |
cd $GITHUB_WORKSPACE/osc | |
export OSC_BUILD_CONCURRENCY=$(nproc) | |
export CC=gcc-12 | |
export CXX=g++-12 | |
xvfb-run ./scripts/build_ubuntu-20.04.sh |