Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/autotag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
steps:
- name: Check pull request
id: check-pr
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
retries: 3
script: |
Expand Down Expand Up @@ -87,28 +87,28 @@ jobs:
core.setOutput('PULL_SHA', pullSHA)

- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
if: ${{ steps.check-pr.outputs.RELEASE_TYPE != '' }}
with:
fetch-depth: 0 # Ref: https://github.com/actions/checkout/issues/100

- name: Get current tag
id: current-tag
uses: "WyriHaximus/github-action-get-previous-tag@04e8485ecb6487243907e330d522ff60f02283ce" # v1.4.0 - latest as of 2025-04-27
uses: "WyriHaximus/github-action-get-previous-tag@61819f33034117e6c686e6a31dba995a85afc9de" # v2.0.0 - latest as of 2026-03-21
if: ${{ steps.check-pr.outputs.RELEASE_TYPE != '' }}
with:
fallback: v0.0.0

- name: Determine next semver version
id: next-semver-version
uses: madhead/semver-utils@36d1e0ed361bd7b4b77665de8093092eaeabe6ba # v4.3.0 - latest as of 2025-04-27
uses: madhead/semver-utils@36d1e0ed361bd7b4b77665de8093092eaeabe6ba # v4.3.0 - latest as of 2026-03-21
if: ${{ steps.check-pr.outputs.RELEASE_TYPE != '' }}
with:
version: ${{ steps.current-tag.outputs.tag }}

- name: Determine next tag
id: next-tag
uses: actions/github-script@v7
uses: actions/github-script@v8
if: ${{ steps.check-pr.outputs.RELEASE_TYPE != '' }}
with:
script: |
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
steps:
- name: Create tag
id: create-tag
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
github-token: ${{ secrets.PAT_WORKFLOW }}
retries: 3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
steps:
- name: Check release tag
id: check-tag
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
console.log('github.event_name', '${{ github.event_name }}')
Expand All @@ -51,7 +51,7 @@ jobs:

- name: Check tag semver
id: check-tag-semver
uses: madhead/semver-utils@36d1e0ed361bd7b4b77665de8093092eaeabe6ba # v4.3.0 - latest as of 2025-04-27
uses: madhead/semver-utils@36d1e0ed361bd7b4b77665de8093092eaeabe6ba # v4.3.0 - latest as of 2026-03-21
if: ${{ steps.check-tag.outputs.RELEASE_TAG != '' }}
with:
version: ${{ steps.check-tag.outputs.RELEASE_TAG }}
Expand All @@ -63,7 +63,7 @@ jobs:
if: ${{ needs.check.outputs.RELEASE_TAG != '' }}
steps:
- name: Make a release
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2 - latest as of 2025-04-27
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1 - latest as of 2026-03-21
if: github.event.inputs.dryRun != 'true'
with:
tag_name: ${{ needs.check.outputs.RELEASE_TAG }}
49 changes: 43 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,44 @@ on:
default: test

jobs:


test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Install mise
run: |
curl https://mise.run | sh
mise settings experimental=true

- name: Trust workspace
run: mise trust

- name: Install dependencies
run: mise exec -- mise install

- name: Configure project
run: mise exec -- make configure

- name: Run formatting checks
run: mise exec -- make format

- name: Run lint
run: mise exec -- make lint

- name: Run static analysis
run: mise exec -- make check

- name: Build project
run: mise exec -- make build

- name: Run tests
run: mise exec -- make test

test-amd64:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -42,15 +78,15 @@ jobs:
steps:
- name: Docker Setup QEMU
if: matrix.platform != 'linux/amd64'
uses: docker/setup-qemu-action@v3.6.0 # v3.6.0 - latest as of 2025-04-27
uses: docker/setup-qemu-action@v4 # v4 - latest as of 2026-03-21
with:
platforms: all

- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v3.10.0 # v3.10.0 - latest as of 2025-04-27
uses: docker/setup-buildx-action@v4 # v4 - latest as of 2026-03-21

- name: Checkout code
uses: actions/checkout@v4 # v4.2.2 - latest as of 2025-04-27
uses: actions/checkout@v6

- name: Create Buildx
run: |
Expand All @@ -74,6 +110,7 @@ jobs:
done

test-arm64:
needs: test
runs-on: ubuntu-24.04-arm
strategy:
matrix:
Expand All @@ -100,10 +137,10 @@ jobs:

steps:
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v3.10.0 # v3.10.0 - latest as of 2025-04-27
uses: docker/setup-buildx-action@v4 # v4 - latest as of 2026-03-21

- name: Checkout code
uses: actions/checkout@v4 # v4.2.2 - latest as of 2025-04-27
uses: actions/checkout@v6

- name: Create Buildx
run: |
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ if(BUILD_TESTS)

enable_testing()
foreach(t app config debug error test)
add_executable(tl_${t}_test tests/arch/generic/tl_${t}_test.c)
add_executable(tl_${t}_test tests/unit/tl_${t}_test.c)
target_link_libraries(tl_${t}_test unity tinyclib)
add_test(NAME tl_${t}_test COMMAND tl_${t}_test)
endforeach()
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CPPCHECK := $(shell if command -v cppcheck >/dev/null 2>&1; then echo cppcheck;
CLANG_TIDY_EXTRA_ARGS := $(shell if [ "$$(uname)" = "Darwin" ]; then echo "--extra-arg=--sysroot=$$(xcrun --show-sdk-path)"; fi)

SRC_FILES := src/*.c include/*.h
TEST_FILES := tests/arch/generic/*.c
TEST_FILES := tests/unit/*.c
ALL_FILES := $(SRC_FILES) $(TEST_FILES)

help: ## Show available make targets
Expand All @@ -18,14 +18,15 @@ configure: ## Configure cmake
cmake --preset default

build: ## Build the project
@test -d "$(BUILD_DIR)" || cmake --preset default
cmake --build --preset default

clean: ## Remove build directory
@test -n "$(CURDIR)" && [ "$(CURDIR)" != "/" ]
rm -rf "$(CURDIR)/$(BUILD_DIR)"

test: ## Build and run tests
cmake --workflow --preset default
test: ## Run tests
ctest --preset default

format: ## Check code formatting
@test -n "$(CLANG_FORMAT)" || { echo "error: clang-format not found"; exit 1; }
Expand All @@ -34,7 +35,7 @@ format: ## Check code formatting
lint: ## Check code linting
@test -n "$(CLANG_TIDY)" || { echo "error: clang-tidy not found"; exit 1; }
$(CLANG_TIDY) -p $(BUILD_DIR) $(CLANG_TIDY_EXTRA_ARGS) \
--header-filter="^$(CURDIR)/(src|include|tests)/" src/*.c tests/arch/generic/*.c
--header-filter="^$(CURDIR)/(src|include|tests)/" src/*.c tests/unit/*.c

check: ## Static analysis
@test -n "$(CPPCHECK)" || { echo "error: cppcheck not found"; exit 1; }
Expand Down
6 changes: 3 additions & 3 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
cmake = "4.3.0"
"conda:make" = "4.4.1"
ninja = "1.13.2"
"pipx:clang-format" = "latest"
"pipx:clang-tidy" = "latest"
"pipx:cppcheck" = "latest"
"pipx:clang-format" = "22.1.1"
"pipx:clang-tidy" = "22.1.0"
"pipx:cppcheck" = "1.5.1"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.