Skip to content

Commit

Permalink
CI: Continuous integration and build fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Sep 26, 2023
1 parent a5a1e2d commit c985886
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 4 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CMake

on:
push:
pull_request:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Build
run: ci/build.sh
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ include_directories(
.
)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")

add_subdirectory(examples)
4 changes: 4 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

cmake -S . -B build
cmake --build build -j
5 changes: 4 additions & 1 deletion examples/c/character.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
add_executable(
character
character.c)
character.c
)

target_link_libraries(character m)
5 changes: 4 additions & 1 deletion examples/c/geometry.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
add_executable(
geometry
geometry.c)
geometry.c
)

target_link_libraries(geometry m)
2 changes: 1 addition & 1 deletion examples/c/logo.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ int main() {
}

uint64_t end = time_ms();
printf("render time: %llums", end - start);
printf("render time: %lums", end - start);



Expand Down
2 changes: 2 additions & 0 deletions examples/c/logo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ add_executable(
logo
logo.c
)

target_link_libraries(logo m)
2 changes: 1 addition & 1 deletion pretty-poly.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ pp_rect_t pp_polygon_bounds(pp_poly_t *p) {
// buffer that each tile is rendered into before callback
// allocate one extra byte to allow a small optimization in the row renderer
const uint32_t tile_buffer_size = PP_TILE_BUFFER_SIZE;
uint8_t tile_buffer[tile_buffer_size + 1];
uint8_t tile_buffer[PP_TILE_BUFFER_SIZE + 1];

// polygon node buffer handles at most 16 line intersections per scanline
// is this enough for cjk/emoji? (requires a 2kB buffer)
Expand Down

0 comments on commit c985886

Please sign in to comment.