Skip to content

Merge branch 'main' into main-dev #9

Merge branch 'main' into main-dev

Merge branch 'main' into main-dev #9

Workflow file for this run

name: "Pre-Release"
on:
push:
branches: ["main-dev"]
pull_request:
branches: ["main-dev"]
env:
BUILD_TYPE: Release
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
PYTHON_VERSION: 3.11
SWIFT_VERSION: 5.9
PYTHONUTF8: 1
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
jobs:
versioning:
name: Update Version
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Run TinySemVer
uses: ashvardanian/[email protected]
with:
verbose: "true"
version-file: "VERSION"
update-version-in: |
CMakeLists.txt:VERSION (\d+\.\d+\.\d+)
update-major-version-in: |
libsee.c:^#define LIBSEE_VERSION_MAJOR (\d+)
update-minor-version-in: |
libsee.c:^#define LIBSEE_VERSION_MINOR (\d+)
update-patch-version-in: |
libsee.c:^#define LIBSEE_VERSION_PATCH (\d+)
dry-run: "true"
test_ubuntu_gcc:
name: Ubuntu (GCC)
runs-on: ubuntu-22.04
env:
CC: gcc
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y cmake build-essential libomp-dev gcc
- name: Build C/C++
run: |
cmake -B build_artifacts -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=1
cmake --build build_artifacts --config RelWithDebInfo
- name: Test C++
run: build_artifacts/libsee_test
if: 0
test_ubuntu_clang:
name: Ubuntu (Clang)
runs-on: ubuntu-22.04
env:
CC: clang
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y cmake build-essential clang
- name: Build C/C++
run: |
cmake -B build_artifacts -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=1
cmake --build build_artifacts --config RelWithDebInfo
- name: Test C++
run: build_artifacts/libsee_test
if: 0
test_ubuntu_cross_compilation:
name: Cross Compilation
runs-on: ubuntu-22.04
env:
CC: clang
AR: llvm-ar
NM: llvm-nm
RANLIB: llvm-ranlib
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
target: x86_64-linux-gnu
- arch: arm64
target: aarch64-linux-gnu
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang lld make crossbuild-essential-arm64 crossbuild-essential-armhf
- name: Build C/C++
run: |
cmake -B build_artifacts \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
-DCMAKE_C_COMPILER_TARGET=${{ matrix.target }} \
-DCMAKE_CXX_COMPILER_TARGET=${{ matrix.target }} \
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch }}
cmake --build build_artifacts --config RelWithDebInfo
# We can't run the produced builds, but we can make sure they exist
- name: Test artifacts presense
run: |
test -e build_artifacts/libsee.so
test -e build_artifacts/libsee_test
if: 0