Fix export obj option. #15
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
name: Build with CMake and Ninja | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Setup LLVM (Ubuntu) | |
if: runner.os == 'Linux' | |
run: | | |
wget https://github.com/mstorsjo/llvm-mingw/releases/download/20230614/llvm-mingw-20230614-ucrt-ubuntu-20.04-x86_64.tar.xz | |
tar xf llvm-mingw-20230614-ucrt-ubuntu-20.04-x86_64.tar.xz | |
echo "$(pwd)/llvm-mingw-20230614-ucrt-ubuntu-20.04-x86_64/bin" >> $GITHUB_PATH | |
- name: Install Dependencies (Ubuntu) | |
if: runner.os == 'Linux' | |
run: sudo apt-get install ninja-build xorg-dev libglu1-mesa-dev libxrandr-dev libxi-dev libxinerama-dev libxcursor-dev libxxf86vm-dev | |
- name: Install Ninja (Windows) | |
if: runner.os == 'Windows' | |
run: choco install ninja | |
- name: Install Ninja (macOS) | |
if: runner.os == 'macOS' | |
run: brew install ninja | |
- name: Create Build Directory | |
run: mkdir build | |
- name: Run CMake | |
run: | | |
cd build | |
cmake .. -GNinja | |
- name: Run Ninja | |
run: | | |
cd build | |
ninja | |
- name: Create Zip File (Windows) | |
run: | | |
cd build | |
powershell Compress-Archive -Path bin/* -DestinationPath bin.zip | |
if: runner.os == 'Windows' | |
- name: Create Zip File (Linux and macOS) | |
run: | | |
cd build | |
zip -r bin.zip bin/ | |
if: runner.os != 'Windows' | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-bin-${{ runner.os }} | |
path: build/bin.zip |