Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
9b9cd5c
ci: set up semantic-release
benthevining May 27, 2023
1682b1d
fix: some fixes for Emscripten
benthevining May 27, 2023
3a83c42
fix: more Emscripten fixes
benthevining May 27, 2023
a4716e9
ci: building shared and static variants
benthevining May 27, 2023
cae72a7
refactor: updating cmake
benthevining May 28, 2023
dc62988
docs: generating tagfile
benthevining May 29, 2023
0ec96a9
test: initial commit of iOS unit testing capabilities
benthevining May 29, 2023
8c5ce2a
refactor: setting no signing flags globally instead of just on our te…
benthevining May 29, 2023
e8ee450
fix: copying Windows DLLs
benthevining May 30, 2023
d8897ff
style: reformatting
benthevining May 30, 2023
5e33ba1
refactor: using lowercase l in test case naming scheme
benthevining May 30, 2023
0492997
initial commit of cli
benthevining May 31, 2023
a8a2994
style: reformatting
benthevining May 31, 2023
02d25b7
fix: fixed cli MSVC errors
benthevining May 31, 2023
0c14cbf
feat: initial commit of Android support
benthevining Jun 4, 2023
883a118
feat: automatically find NDK dir in envrc
benthevining Jun 4, 2023
96c42d4
fix: updating build for tests on iOS/tvOS/watchOS
benthevining Jun 5, 2023
60fd595
feat: added a version header
benthevining Jun 6, 2023
6011267
refactor: updating iOS presets with build presets for device/simulato…
benthevining Jun 7, 2023
06121a2
feat: initial commit of iOS crosscompiling emulator script
benthevining Jun 7, 2023
0629e19
test: updating iOS testing emulator script
benthevining Jun 7, 2023
17d7dd3
fix: updating iOS crosscompiling
benthevining Jun 7, 2023
c1590f6
refactor: now using linfra submodule
benthevining Jun 7, 2023
4fb3f8e
refactor: using linfra cmake utils
benthevining Jun 8, 2023
e0399b2
updating linfra
benthevining Jun 8, 2023
d3d7f49
updating linfra
benthevining Jun 8, 2023
7c5e644
updating linfra
benthevining Jun 8, 2023
06d0c56
update linfra
benthevining Jun 8, 2023
caf025b
feat: using relint
benthevining Jun 8, 2023
8c0df6f
docs: added docs coverage
benthevining Jun 8, 2023
d011ed2
began implementing cli tool
benthevining Jun 9, 2023
0dd875e
added some tests for the cli tool
benthevining Jun 9, 2023
f55e339
updating linfra
benthevining Jun 9, 2023
b9c5ab5
not building CLI on Emscripten
benthevining Jun 9, 2023
9a3fa6d
style: reformatting cmake
benthevining Jun 13, 2023
f550c8b
refactor(cmake): grouping source files nicely in cmake
benthevining Jul 3, 2023
113776d
refactor(cmake): grouping CLI source files
benthevining Jul 3, 2023
7cf97ee
docs: updating some todos
benthevining Aug 22, 2023
2f435df
added a todo
benthevining Aug 22, 2023
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
31 changes: 31 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# ======================================================================================
# __ ____ __ __ ____ ___
# ( ) (_ _)( \/ )( ___)/ __)
# )(__ _)(_ ) ( )__) \__ \
# (____)(____)(_/\/\_)(____)(___/
#
# This file is part of the Limes open source library and is licensed under the terms of the GNU Public License.
#
# Commercial licenses are available; contact the maintainers at ben.the.vining@gmail.com to inquire for details.
#
# ======================================================================================

# configuration file for the bumpversion tool: https://github.com/c4urself/bump2version
# This tool is run by semantic-release when the version is bumped.

[bumpversion]
current_version = 0.0.1
tag = False
commit = False

[bumpversion:file:CMakeLists.txt]
search = VERSION {current_version}
replace = VERSION {new_version}

[bumpversion:file:package.json]
search = "version": "{current_version}"
replace = "version": "{new_version}"

[bumpversion:file:CITATION.cff]
search = version: {current_version}
replace = version: {new_version}
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ trim_trailing_whitespace = false
[LICENSE]
indent_style = space

[*.{yml,yaml,json,clang-*}]
[*.{yml,yaml,json,cff,clang-*}]
indent_style = space
indent_size = 2
68 changes: 6 additions & 62 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,74 +24,18 @@
#
# SKIP - comma-separated list of pre-commit hook IDs that will be skipped
# CMAKE_APPLE_SILICON_PROCESSOR - tell CMake if your Mac is an M1 (arm64) or not (x86_64)
# EMSCRIPTEN_ROOT - path to the root of the Emscripten SDK. This file attempts to locate it automatically but your .env can override it.
# EMSCRIPTEN_ROOT - path to the root of the Emscripten SDK. This file attempts to locate it automatically but your .env can override it.
# ANDROID_NDK_ROOT - path to the Android NDK to use. This file attempts to locate it automatically but your .env can override it.
# IOS_SIMULATOR_DEVICE_ID - device ID of simulator to use for running iOS tests
# TVOS_SIMULATOR_DEVICE_ID - device ID of simulator to use for running tvOS tests
# WATCHOS_SIMULATOR_DEVICE_ID - device ID of simulator to use for running watchOS tests
#
# see CMake's environment variables documentation: https://cmake.org/cmake/help/latest/manual/cmake-env-variables.7.html

strict_env
direnv_version 2.32.2

export CMAKE_GENERATOR="Ninja Multi-Config"

export CMAKE_CONFIG_TYPE=Debug

export CMAKE_COLOR_DIAGNOSTICS=ON

export CMAKE_EXPORT_COMPILE_COMMANDS=ON

export CTEST_OUTPUT_ON_FAILURE=ON
export CTEST_PROGRESS_OUTPUT=ON
export CTEST_NO_TESTS_ACTION=error

if has nproc; then
NUM_PROCS=$(nproc --all)
elif has getconf; then
NUM_PROCS=$(getconf _NPROCESSORS_ONLN)
else
NUM_PROCS=$([ $(uname) = 'Darwin' ] &&
sysctl -n hw.logicalcpu_max ||
lscpu -p | egrep -v '^#' | wc -l
)
fi

export CMAKE_BUILD_PARALLEL_LEVEL="$NUM_PROCS"
export CTEST_PARALLEL_LEVEL="$NUM_PROCS"

if [[ $(uname -p) == 'arm' ]]; then
export CMAKE_APPLE_SILICON_PROCESSOR=arm64
else
export CMAKE_APPLE_SILICON_PROCESSOR=x86_64
fi

export CMAKE_OSX_ARCHITECTURES="x86_64;arm64"
export MACOSX_DEPLOYMENT_TARGET="11.0"

export VERBOSE=ON

# in case anyone happens to be using CPM.cmake
export CPM_SOURCE_CACHE="$(pwd)/Cache"

# default to GCC (direnv doesn't support Windows, so gcc should work everywhere direnv is used)
export CC="gcc"
export CXX="g++"
export FC="gfortran"

export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

export PRE_COMMIT_COLOR=always

# check if the Emscripten SDK is installed
if has emcc; then
# need to call asdf-which if using asdf
# TODO: more robust check to see if emsdk is installed using ASDF?
if has asdf; then
EMCC_PATH=$(asdf which emcc)
else
EMCC_PATH=$(which emcc)
fi

export EMSCRIPTEN_ROOT=$(expand_path $EMCC_PATH/..)
fi
source_env linfra/.envrc

source_env_if_exists .envrc.user
dotenv_if_exists .env
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

# For conformance with .editorconfig
LICENSE space_indent
CITATION.cff 2_space_indent
*.yml 2_space_indent
*.yaml 2_space_indent
*.json 2_space_indent
Expand Down
45 changes: 45 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# ======================================================================================
# __ ____ __ __ ____ ___
# ( ) (_ _)( \/ )( ___)/ __)
# )(__ _)(_ ) ( )__) \__ \
# (____)(____)(_/\/\_)(____)(___/
#
# This file is part of the Limes open source library and is licensed under the terms of the GNU Public License.
#
# Commercial licenses are available; contact the maintainers at ben.the.vining@gmail.com to inquire for details.
#
# ======================================================================================

version: 2

updates:

- package-ecosystem: npm
directory: /
schedule:
interval: daily
commit-message:
prefix: chore(deps) [skip ci]
include: scope
reviewers:
- benthevining

- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
commit-message:
prefix: chore(deps) [skip ci]
include: scope
reviewers:
- benthevining

- package-ecosystem: gitsubmodule
directory: /
schedule:
interval: daily
commit-message:
prefix: chore(deps) [skip ci]
include: scope
reviewers:
- benthevining
88 changes: 74 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ run-name: CI (${{ github.actor }})
on:
workflow_dispatch:
push:
branches: [main]
pull_request:

concurrency:
Expand All @@ -32,7 +33,7 @@ permissions:

jobs:

ci:
build-and-test:

if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}

Expand All @@ -41,7 +42,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
preset: [clang, emscripten, gcc, iOS, tvOS, watchOS]
config: [Debug, Release]
shared-libs: ['ON', 'OFF']
exclude:
- os: windows-latest
preset: gcc
Expand All @@ -60,20 +61,20 @@ jobs:
include:
- os: windows-latest
preset: vs
config: Debug
shared-libs: 'ON'
- os: windows-latest
preset: vs
config: Release
shared-libs: 'OFF'
- os: macos-latest
preset: xcode
config: Debug
shared-libs: 'ON'
- os: macos-latest
preset: xcode
config: Release
shared-libs: 'OFF'

runs-on: ${{ matrix.os }}

name: Build (${{ matrix.os }}, ${{ matrix.preset }}, ${{ matrix.config }})
name: Build (${{ matrix.os }}, ${{ matrix.preset }}, ${{ matrix.shared-libs }})

timeout-minutes: 10

Expand All @@ -95,21 +96,80 @@ jobs:
run: echo "EMSCRIPTEN_ROOT=$(which emcc)/.." >> $GITHUB_ENV

- name: Configure CMake
run: cmake --preset ${{ matrix.preset }}
run: cmake --preset ${{ matrix.preset }} -D BUILD_SHARED_LIBS=${{ matrix.shared-libs }}

- name: Run build
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.config }}
- name: Run Debug build
run: cmake --build --preset ${{ matrix.preset }} --config Debug

- name: Run tests
- name: Run Debug tests
if: ${{ ! ( matrix.preset == 'iOS' || matrix.preset == 'tvOS' || matrix.preset == 'watchOS' ) }}
run: ctest --preset ${{ matrix.preset }} -C ${{ matrix.config }}
run: ctest --preset ${{ matrix.preset }} -C Debug

- name: Run Release build
run: cmake --build --preset ${{ matrix.preset }} --config Release

- name: Run Release tests
if: ${{ ! ( matrix.preset == 'iOS' || matrix.preset == 'tvOS' || matrix.preset == 'watchOS' ) }}
run: ctest --preset ${{ matrix.preset }} -C Release

- name: Generate package
run: cpack --preset ${{ matrix.preset }} -C ${{ matrix.config }} -B $GITHUB_WORKSPACE/deploy
run: cpack --preset ${{ matrix.preset }} -B $GITHUB_WORKSPACE/deploy

- name: Upload artefact
uses: actions/upload-artifact@main
with:
name: ${{ matrix.os }}-${{ matrix.preset }}-${{ matrix.config }}
name: ${{ matrix.os }}-${{ matrix.preset }}-${{ matrix.shared-libs }}
path: deploy/**.zip
if-no-files-found: error


create-release:

if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && github.ref == 'refs/heads/main' }}

needs: build-and-test

name: Create release

runs-on: ubuntu-latest

timeout-minutes: 20

permissions:
contents: write
packages: write
deployments: write

steps:

- name: Checkout code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # pin@v3.6.0
with:
node-version: lts/*

- name: Install NPM dependencies
uses: bahmutov/npm-install@7b5291ae7bf768fecff627796beaf8a95c9c2bfd # pin@v1.8.29
with:
useLockFile: false
useRollingCache: true

- name: Install dependencies
run: pip install --upgrade bumpversion

- name: Download artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # pin@v3
with:
path: ${{ github.workspace }}/deploy

- name: Zip source code
run: git archive --format=tar --output=source-code.tar --worktree-attributes HEAD

- name: Run semantic release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "linfra"]
path = linfra
url = https://github.com/benthevining/linfra
Loading