Add default value of knob to the usage message #1118
Workflow file for this run
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: Linux build | |
on: | |
pull_request: | |
# Cancel previous runs if a more recent commit is pushed. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
permissions: read-all | |
jobs: | |
linux-build: | |
name: Build and run tests on Linux | |
runs-on: "ubuntu-20.04" | |
steps: | |
- name: Setup necessary packages | |
run: | | |
sudo add-apt-repository ppa:kisak/kisak-mesa -y | |
sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libx11-dev libxcursor-dev libxi-dev libx11-xcb-dev clang \ | |
mesa-vulkan-drivers | |
- name: Setup Vulkan SDK | |
run: | | |
wget -q https://sdk.lunarg.com/sdk/download/1.3.216.0/linux/vulkansdk-linux-x86_64-1.3.216.0.tar.gz | |
if ! echo "2cb10cb94ac656e9e454f1f5ae48e8a833253af5fe22562d27310db45b579212 vulkansdk-linux-x86_64-1.3.216.0.tar.gz" | sha256sum -c --status; then | |
echo "Invalid SHA256 for VulkanSDK's binary. Aborting." | |
exit 1 | |
fi | |
mkdir "${HOME}/vulkan-sdk" | |
tar -xf vulkansdk-linux-x86_64-1.3.216.0.tar.gz -C "${HOME}/vulkan-sdk" | |
echo "VULKAN_SDK=${HOME}/vulkan-sdk/1.3.216.0/x86_64" >> $GITHUB_ENV | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Switch to pull request branch and clone submodules | |
run: | | |
git checkout ${GITHUB_SHA} | |
git submodule update --init --recursive | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
# -DBUILD_TESTS=OFF only disables the OpenXR tests | |
cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DPPX_BUILD_TESTS=ON -DPPX_BUILD_XR=1 -DBUILD_TESTS=OFF | |
make -j $(nproc) | |
- name: Run unit tests | |
run: | | |
cd build | |
ctest -j $(nproc) | |
- name: Run runtime tests | |
run: | | |
cd build/bin | |
xvfb-run -a ./vk_03_square_textured --frame-count 2 --screenshot-frame-number 1 | |
convert screenshot_frame1.ppm vk_03_square_textured_screenshot.png | |
xvfb-run -a ./vk_09_obj_geometry --frame-count 2 --screenshot-frame-number 1 | |
convert screenshot_frame1.ppm vk_09_obj_geometry_screenshot.png | |
xvfb-run -a ./vk_13_normal_map --frame-count 2 --screenshot-frame-number 1 | |
convert screenshot_frame1.ppm vk_13_normal_map_screenshot.png | |
xvfb-run -a ./vk_fishtornado --frame-count 2 --screenshot-frame-number 1 | |
convert screenshot_frame1.ppm vk_fishtornado_screenshot.png | |
- name: Upload screenshots | |
uses: actions/upload-artifact@v3 | |
with: | |
name: screenshots | |
path: build/bin/*.png |