diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index d309ad9..ea4df1a 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -45,19 +45,32 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 + - uses: mlugg/setup-zig@v1 with: - name: klawa - path: zig-out/bin + version: latest - name: Install dependencies shell: bash run: | - sudo apt-get install ffmpeg xdotool xvfb \ - libc6-dbg + sudo apt-get install libgl-dev libxi-dev \ + libx11-dev xserver-xorg-dev xorg-dev \ + ffmpeg xdotool xvfb \ + libc6-dbg util-linux + - 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 + - run: | + lscpu + zig build -Dcpu=znver3 -Dtarget=x86_64-native --verbose - name: Run tests shell: bash run: | - chmod +x zig-out/bin/klawa ldd zig-out/bin/klawa cd tests && ./test.sh - uses: actions/upload-artifact@v4 diff --git a/src/main.zig b/src/main.zig index a631fff..262ffbd 100644 --- a/src/main.zig +++ b/src/main.zig @@ -576,6 +576,7 @@ pub fn main() !void { show_gui = !show_gui; } + std.debug.print("Keys pop\n", .{}); if (keys.pop()) |k| { std.debug.print("Consumed: '{s}'\n", .{k.symbol}); @@ -599,11 +600,13 @@ pub fn main() !void { } else |_| {} } + std.debug.print("Begin drawing\n", .{}); rl.beginDrawing(); rl.clearBackground(rl.Color.white); const rot = rl.Vector2{ .x = 0, .y = 0 }; + std.debug.print("Key states update\n", .{}); for (key_states) |k| { rl.drawTexturePro(keycap_texture, k.src, k.dst, rot, k.angle, rl.Color.white); @@ -679,10 +682,12 @@ pub fn main() !void { if (debug) { rl.drawFPS(10, 10); } + std.debug.print("End drawing\n", .{}); rl.endDrawing(); tracy.frameMark(); if (res.args.render) |render_dir| { + std.debug.print("Start render\n", .{}); const rendering = tracy.traceNamed(@src(), "render"); defer rendering.end();