check on master #44
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: Build & Test | |
on: | |
push: | |
pull_request: | |
jobs: | |
build-and-test: | |
name: Build and test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
zig_version: | |
- latest | |
#- master - not compatible yet | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: mlugg/setup-zig@v1 | |
with: | |
version: ${{ matrix.zig_version }} | |
- name: Install dependencies | |
shell: bash | |
run: | | |
sudo apt-get install libgl-dev libxi-dev \ | |
libx11-dev xserver-xorg-dev xorg-dev | |
# kle tests not triggered from main, | |
# must figure out how to properly zig test | |
- run: | | |
zig build | |
zig build test | |
zig test src/kle.zig | |
zig test src/spsc_queue.zig | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: klawa | |
path: zig-out/bin/klawa | |
retention-days: 2 | |
if-no-files-found: error | |
run-functional-tests: | |
name: Run functional tests | |
needs: | |
- build-and-test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: mlugg/setup-zig@v1 | |
with: | |
version: master | |
- name: Install dependencies | |
shell: bash | |
run: | | |
sudo apt-get install libgl-dev libxi-dev \ | |
libx11-dev xserver-xorg-dev xorg-dev \ | |
ffmpeg xdotool xvfb \ | |
libc6-dbg util-linux gdb \ | |
libxi6 | |
- name: Install debug dependencies | |
shell: bash | |
run: | | |
sudo apt install ubuntu-dbgsym-keyring | |
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse | |
deb http://ddebs.ubuntu.com $(lsb_release -cs)-updates main restricted universe multiverse | |
deb http://ddebs.ubuntu.com $(lsb_release -cs)-proposed main restricted universe multiverse" | \ | |
sudo tee -a /etc/apt/sources.list.d/ddebs.list | |
sudo apt-get update | |
sudo apt-get install xserver-xorg-core-dbgsym libx11-6-dbgsym libxi6-dbgsym | |
- name: Set cores to get stored in /cores | |
run: | | |
sudo mkdir /cores | |
sudo chmod 777 /cores | |
sudo bash -c 'echo "/cores/%e.%p.%t.core" > /proc/sys/kernel/core_pattern' | |
- run: | | |
lscpu | |
zig build -Dcpu=znver3 -Dtarget=x86_64-native --verbose | |
- name: Run tests | |
shell: bash | |
run: | | |
ulimit -c unlimited | |
ldd zig-out/bin/klawa | |
cd tests && ./test.sh | |
- name: Run tests | |
if: always() | |
shell: bash | |
run: | | |
ls -alh /cores | |
core=$(find /cores -type f -name *.core) | |
printf "bt\nquit\n" >> file.txt | |
gdb --command=file.txt ./zig-out/bin/klawa $core | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: output.webm | |
path: tests/output.webm | |
retention-days: 2 | |
if-no-files-found: error |