Merge pull request #5669 from Web-eWorks/bvh-perf #1659
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
# Test all pull requests to ensure they build | |
name: Build Pioneer | |
# Controls when the action will run. | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
paths: | |
- 'src/**.cpp' | |
- 'src/**.h' | |
release: | |
types: [published] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref == 'refs/heads/master' }} | |
env: | |
packages: > | |
mesa-common-dev | |
libfreeimage-dev | |
libglew-dev | |
libsigc++-2.0-dev | |
libvorbis-dev | |
libassimp-dev | |
libsdl2-dev | |
libsdl2-image-dev | |
ninja-build | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build-msvc: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: pioneer | |
- name: Checkout pioneer-thirdparty | |
uses: actions/checkout@v3 | |
with: | |
repository: pioneerspacesim/pioneer-thirdparty | |
path: pioneer-thirdparty | |
- name: Build MSVC | |
shell: cmd | |
run: | | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
cd pioneer | |
mkdir build | |
cd build | |
cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX="C:/Program Files/Pioneer" -DPIONEER_DATA_DIR="C:/Program Files/Pioneer/data" -DCMAKE_BUILD_TYPE:STRING=Release -DGIT_EXECUTABLE="c:/Program Files/Git/cmd/git.exe" | |
cmake --build . | |
- name: Build Pioneer Data | |
shell: cmd | |
run: | | |
cd pioneer | |
modelcompiler.exe -b inplace | |
- name: Build Release | |
shell: cmd | |
run: | | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
cd pioneer | |
cd build | |
cmake --build . --target install | |
cmake --build . --target win-installer | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Windows-Artifacts | |
path: pioneer/pioneer-*-win.exe | |
- name: Upload Release Files | |
uses: softprops/action-gh-release@v1 | |
if: ${{ github.event_name == 'release' }} | |
with: | |
files: pioneer/pioneer-*-win.exe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-gcc: | |
runs-on: ubuntu-20.04 | |
steps: | |
# Checkout the repository as $GITHUB_WORKSPACE | |
- uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: | | |
sudo apt-fast update | |
sudo apt-fast install -y ${{ env.packages }} | |
- name: Setup CMake | |
run: | | |
cp scripts/CMakeBuildPresetsCI.json CMakeUserPresets.json | |
cmake -G Ninja --preset linux-x64-release | |
- name: Build GCC | |
run: cmake --build ./build --target all | |
- name: Build Pioneer Data | |
run: cmake --build ./build --target build-data | |
- name: Run Tests | |
run: ./build/unittest | |
- name: Generate Artifacts | |
uses: ./.github/actions/upload-linux | |
with: | |
artifact_name: Linux 64-bit | |
build_slug: linux-x64-release | |
token: ${{ secrets.GITHUB_TOKEN }} | |
upload_release: true | |
build-gcc-avx: | |
runs-on: ubuntu-20.04 | |
steps: | |
# Checkout the repository as $GITHUB_WORKSPACE | |
- uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: | | |
sudo apt-fast update | |
sudo apt-fast install -y ${{ env.packages }} | |
- name: Setup CMake | |
run: | | |
cp scripts/CMakeBuildPresetsCI.json CMakeUserPresets.json | |
cmake -G Ninja --preset linux-x64-release-avx | |
- name: Build GCC | |
run: cmake --build ./build --target all | |
- name: Build Pioneer Data | |
run: cmake --build ./build --target build-data | |
- name: Run Tests | |
run: ./build/unittest | |
- name: Generate Artifacts | |
uses: ./.github/actions/upload-linux | |
with: | |
artifact_name: Linux 64-bit (AVX2 enabled) | |
build_slug: linux-x64-release-avx | |
token: ${{ secrets.GITHUB_TOKEN }} | |
upload_release: true | |
build-clang: | |
runs-on: ubuntu-20.04 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checkout the repository as $GITHUB_WORKSPACE | |
- uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: | | |
sudo apt-fast update | |
sudo apt-fast install -y clang-8 ${{ env.packages }} | |
- name: Setup CMake | |
run: | | |
cp scripts/CMakeBuildPresetsCI.json CMakeUserPresets.json | |
export CC=clang CXX=clang++ | |
cmake -G Ninja --preset linux-x64-release | |
- name: Build Clang | |
run: cmake --build ./build --target all | |
- name: Build Pioneer Data | |
run: cmake --build ./build --target build-data | |
- name: Run Tests | |
run: ./build/unittest |