18 Commits

Author SHA1 Message Date
95deda1f59 v1.0.0
All checks were successful
Release / release (push) Successful in 3s
2026-03-08 23:56:50 +00:00
3f3d1e1e5d Ensure all tags are fetched when checking out the repo
All checks were successful
Release / release (push) Successful in 3s
2026-03-08 23:55:19 +00:00
877b8e9a04 Update release workflow
Some checks failed
Release / release (push) Failing after 2s
2026-03-08 23:52:05 +00:00
4ce59f537c Trigger workflow one more time
Some checks failed
Release / release (push) Failing after 3s
2026-03-08 23:44:02 +00:00
7d13bde13b Trigger workflow 2026-03-08 23:40:18 +00:00
3aa792a620 Add release workflow 2026-03-08 23:34:09 +00:00
c0b667847c Update package script 2026-03-08 23:33:59 +00:00
ce2956f072 Update package script 2026-03-08 23:14:16 +00:00
a1182016af Add VERSION 2026-03-08 21:38:47 +00:00
59423e294a Add packaging script 2026-03-08 21:38:41 +00:00
ef5c9376a9 Fix mistake when building with no runtime assert 2026-03-08 20:22:21 +00:00
eeed101228 Move large file source def to code 2026-03-08 13:10:17 +00:00
6b88d7e3fe Add TODO for updating UUID implementation 2026-02-09 00:02:21 +00:00
58dab46902 Revert "Update uuid C++ implementation"
This reverts commit 1cdb08a81a.
2026-02-08 23:57:09 +00:00
269ee5d9ab Revert "Update uuid C++ implementation"
This reverts commit 610df6869f.
2026-02-08 23:57:05 +00:00
610df6869f Update uuid C++ implementation 2026-02-08 23:53:30 +00:00
1cdb08a81a Update uuid C++ implementation 2026-02-08 23:48:02 +00:00
8d9ef89329 Fix bug with queue 2026-02-08 19:16:36 +00:00
7 changed files with 99 additions and 3 deletions

View File

@@ -0,0 +1,81 @@
name: Release
on:
push:
branches:
- main # or your default branch
jobs:
release:
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch full history
tags: true # fetch all tags
- name: Check/Create Tag
id: tag
run: |
VERSION=$(cat VERSION | tr -d '[:space:]') # read version and trim whitespace
echo "Version: $VERSION"
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
echo "Tag v$VERSION already exists. Skipping release."
exit 0
fi
# Tag does not exist → create it
echo "Creating tag v$VERSION"
git tag "v$VERSION"
git push origin "v$VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Build Artifacts
if: steps.tag.outputs.version
run: |
chmod +x ./package
./package
ls -l dist/
- name: Create Release
if: steps.tag.outputs.version
id: create_release
run: |
VERSION="${{ steps.tag.outputs.version }}"
RESPONSE=$(curl -s -X POST \
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
-H "Content-Type: application/json" \
"https://git.thewizardapprentice.com/api/v1/repos/${{ gitea.repository }}/releases" \
-d '{
"tag_name": "v'"$VERSION"'",
"name": "wapp-v'"$VERSION"'",
"body": "Automated release for wapp-v'"$VERSION"'",
"draft": false,
"prerelease": false
}')
echo "$RESPONSE"
RELEASE_ID=$(echo $RESPONSE | jq -r '.id')
echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT
- name: Upload Artifacts
if: steps.tag.outputs.version
run: |
RELEASE_ID="${{ steps.create_release.outputs.release_id }}"
for FILE in dist/*; do
FILENAME=$(basename "$FILE")
echo "Uploading $FILENAME"
curl -X POST \
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$FILE" \
"https://git.thewizardapprentice.com/api/v1/repos/${{ gitea.repository }}/releases/$RELEASE_ID/assets?name=$FILENAME"
done
- name: Cleanup
if: steps.tag.outputs.version
run: rm -rf dist/*

View File

@@ -10,7 +10,7 @@ INSTALL_PREFIX = dist
RUNTIME_ASSERT = true
# Internal variables
override CFLAGS = -Wall -Wextra -Werror -pedantic -Isrc -D_LARGEFILE64_SOURCE
override CFLAGS = -Wall -Wextra -Werror -pedantic -Isrc
override LIBFLAGS = -fPIC
override CSTD := -std=gnu11
override CXXSTD := -std=gnu++11
@@ -46,7 +46,7 @@ endif
# Disable runtime asserts
ifeq ($(RUNTIME_ASSERT), false)
override BUILD_FLAGS += WAPP_NO_RUNTIME_ASSERT
override BUILD_FLAGS += -DWAPP_NO_RUNTIME_ASSERT
endif
ifeq ($(CC),gcc)

1
VERSION Normal file
View File

@@ -0,0 +1 @@
1.0.0

11
package Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
cp -r src wapp
mkdir -p dist
ARCHIVE_NAME="wapp-v$(cat VERSION)"
tar -czvf dist/$ARCHIVE_NAME.tar.gz wapp
zip -r dist/$ARCHIVE_NAME.zip wapp
rm -rf wapp

View File

@@ -54,7 +54,7 @@ typedef GenericQueue Str8Queue;
}())
#define wapp_queue_alloc(TYPE, ALLOCATOR_PTR, CAPACITY) ([&]() { \
wapp_persist GenericQueue queue = { \
wapp_array_alloc_capacity(TYPE, ALLOCATOR_PTR, CAPACITY, ARRAY_INIT_FILLED) \
wapp_array_alloc_capacity(TYPE, ALLOCATOR_PTR, CAPACITY, ARRAY_INIT_FILLED), \
0, \
0, \
0, \

View File

@@ -16,6 +16,7 @@
#define lseek64 lseek
#endif // !WAPP_PLATFORM_APPLE
#define __USE_LARGEFILE64
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>

View File

@@ -20,6 +20,8 @@ struct WUUID {
Str8 uuid;
};
// TODO (Abdelrahman): Update UUID implementation to work properly with C++ and tests for validation
#define wapp_uuid_gen_uuid4() *(wapp_uuid_init_uuid4(&wapp_uuid_create()))
/* Low level UUID API */