Skip to content

Commit dec9745

Browse files
authored
Add CI support (#37)
* Do not link libm with MSVC. * Windows build fixes: * Fix copy files to build folder when building with MSVC * Add support for mingw64 builds. * Fix GL rendering issue and input scale in macOS. * Fix input coordinates for all mouse events. * Fix input position on all mouse events. * Fix double free bug. * WTF. Fix double free bug. * Test github actions. * Fixes. * Try again. * And again. * More Linux deps.
1 parent b3eb2ce commit dec9745

File tree

4 files changed

+82
-1
lines changed

4 files changed

+82
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Linux
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Linux:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v3
11+
with:
12+
ref: ${{ github.ref }}
13+
fetch-depth: 2
14+
- name: Install dependencies
15+
run: |
16+
sudo apt-get update
17+
sudo apt-get install -y wayland-protocols libwayland-dev libxkbcommon-dev libx11-dev libxrandr-dev libxinerama-dev libxi-dev libxcursor-dev
18+
- name: Build
19+
run: |
20+
mkdir build
21+
cd build
22+
cmake ..
23+
cmake --build . -j$(nproc)
24+
- name: Unit Tests
25+
run: |
26+
cd build/bin/
27+
./skribidi_test
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: macOS
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
MacOS:
7+
runs-on: macos-latest
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v3
11+
with:
12+
ref: ${{ github.ref }}
13+
fetch-depth: 2
14+
- name: Build
15+
run: |
16+
mkdir build
17+
cd build
18+
cmake ..
19+
cmake --build . -j$(sysctl -n hw.ncpu)
20+
- name: Unit Tests
21+
run: |
22+
cd build/bin/
23+
./skribidi_test
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Windows
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Windows:
7+
runs-on: windows-latest
8+
steps:
9+
- name: Configure Git
10+
shell: cmd
11+
run: |
12+
git config --system core.autocrlf false
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
with:
16+
ref: ${{ github.ref }}
17+
fetch-depth: 2
18+
- name: Build
19+
shell: powershell
20+
run: |
21+
mkdir build
22+
cd build
23+
cmake ..
24+
$cores = [Environment]::ProcessorCount
25+
Write-Host "Found $cores logical processors. Building with -j$cores"
26+
cmake --build . --config Debug -j"$cores"
27+
- name: Unit Tests
28+
shell: cmd
29+
run: |
30+
cd build/bin/Debug
31+
skribidi_test.exe

test/test_layout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static int test_missing_script(void)
2525
ENSURE(temp_alloc != NULL);
2626

2727
skb_font_collection_t* font_collection = skb_font_collection_create();
28-
skb_font_t * font = skb_font_collection_add_font(font_collection, "../example/data/IBMPlexSans-Regular.ttf", SKB_FONT_FAMILY_DEFAULT);
28+
skb_font_t * font = skb_font_collection_add_font(font_collection, "data/IBMPlexSans-Regular.ttf", SKB_FONT_FAMILY_DEFAULT);
2929
ENSURE(font != NULL);
3030

3131
skb_layout_params_t layout_params = {

0 commit comments

Comments
 (0)