Skip to content

Commit 4d1486b

Browse files
committed
Some CI actions
1 parent 9c01fef commit 4d1486b

File tree

3 files changed

+77
-1
lines changed

3 files changed

+77
-1
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
8+
jobs:
9+
build-test:
10+
name: Build and Test (${{ matrix.os }})
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest]
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
submodules: "recursive"
22+
23+
- name: Install dependencies (Ubuntu)
24+
if: runner.os == 'Linux'
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y libsdl2-dev libpng-dev cmake ninja-build
28+
29+
- name: Install dependencies (macOS)
30+
if: runner.os == 'macOS'
31+
run: |
32+
brew update
33+
brew install sdl2 libpng cmake
34+
35+
- name: Build tests
36+
run: |
37+
cmake -S tests -B tests/build -DCMAKE_BUILD_TYPE=Release
38+
cmake --build tests/build -j
39+
40+
- name: Run tests
41+
run: ctest --test-dir tests/build --output-on-failure
42+
43+
- name: Build IBMF example
44+
run: |
45+
cmake -S examples/SDL/IBMF -B examples/SDL/IBMF/build -DCMAKE_BUILD_TYPE=Release
46+
cmake --build examples/SDL/IBMF/build -j
47+
48+
- name: Build TTF example
49+
run: |
50+
cmake -S examples/SDL/TTF -B examples/SDL/TTF/build -DCMAKE_BUILD_TYPE=Release
51+
cmake --build examples/SDL/TTF/build -j
52+
53+

.github/workflows/format.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Clang Format (PRs)
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
format:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
with:
13+
submodules: "recursive"
14+
15+
- name: Install clang-format
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install -y clang-format
19+
20+
- name: Check formatting
21+
run: |
22+
make format-check
23+

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ target_compile_definitions(tests_ibmf PRIVATE GOLDEN_DIR="${CMAKE_CURRENT_LIST_D
2323
target_sources(tests_ibmf PRIVATE
2424
${TINY_FONT_ROOT}/src/IBMFDriver/IBMFFont.cpp
2525
${TINY_FONT_ROOT}/src/IBMFDriver/IBMFFontData.cpp
26-
${TINY_FONT_ROOT}/src/IBMFDriver/IBMFfAce.cpp
26+
${TINY_FONT_ROOT}/src/IBMFDriver/IBMFFace.cpp
2727
${TINY_FONT_ROOT}/src/IBMFDriver/RLEExtractor.cpp
2828
)
2929
add_test(NAME ibmf_render COMMAND tests_ibmf)

0 commit comments

Comments
 (0)