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
83 changes: 83 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
on:
push:
branches:
- "main"
pull_request:
workflow_dispatch:

permissions:
contents: write

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
_VCPKG_: ${{ github.workspace }}/external/microsoft/vcpkg
VCPKG_ROOT: ${{ github.workspace }}/external/microsoft/vcpkg
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/external/microsoft/vcpkg/bincache
VCPKG_FEATURE_FLAGS: "dependencygraph"

jobs:
build-test:
runs-on: ubuntu-22.04
env:
TRIPLET: x64-linux
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: "true"

- uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');

- name: "Create directory '${{ env.VCPKG_DEFAULT_BINARY_CACHE }}'"
run: mkdir -p ${{ github.workspace }}/external/microsoft/vcpkg/bincache
shell: bash

- uses: lukka/get-cmake@latest
with:
cmakeVersion: "3.29.0"

- name: Restore vcpkg
uses: actions/cache@v3
with:
path: |
${{ env._VCPKG_ }}
!${{ env._VCPKG_ }}/buildtrees
!${{ env._VCPKG_ }}/packages
!${{ env._VCPKG_ }}/downloads
!${{ env._VCPKG_ }}/installed
key: |
${{ env.TRIPLET }}-${{ hashFiles( '.git/modules/external/microsoft/vcpkg/HEAD' )}}

- name: Configure
env:
CMAKE_VERBOSE_MAKEFILE: 1
VCPKG_DEBUG: 1
run: |
echo "Configuring for triplet ${{ env.TRIPLET }}"
TRIPLET=${{ env.TRIPLET }} make configure

- name: Upload vcpkg buildtrees
if: always()
uses: actions/upload-artifact@v4
with:
name: vcpkg-buildtrees-${{ env.TRIPLET }}-${{ github.sha }}
path: external/microsoft/vcpkg/buildtrees/science-scipp
retention-days: 1

- name: Build
run: NPROC=1 make build

- uses: actions/upload-artifact@v4
with:
name: build-${{ env.TRIPLET }}-${{ github.sha }}
path: build
retention-days: 1

- name: Run tests
run: make test
shell: bash
18 changes: 18 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.RELEASE_PLEASE_AT }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.23.5)

project(synapse VERSION 0.0.1)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/version.txt" SYNAPSE_CPP_VERSION)
string(STRIP "${SYNAPSE_CPP_VERSION}" SYNAPSE_CPP_VERSION)
project(synapse VERSION ${SYNAPSE_CPP_VERSION})

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
VCPKG_MANIFEST_FEATURES ?= examples\;tests

.PHONY: all
all: clean configure build

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ To build:

```sh
git submodule update --init

# Set up vcpkg -- you can also use a vcpkg elsewhere via VCPKG_ROOT
cd external/microsoft/vcpkg && ./bootstrap-vcpkg.sh && cd -
export VCPKG_ROOT="$(pwd)/external/microsoft/vcpkg}"

make all

# or
Expand Down
10 changes: 10 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"packages": {
".": {
"release-type": "simple"
}
},
"bootstrap-sha": "e255ba2a354554be7b59ad7711aef9695cd34a92",
"always-update": true,
"bump-minor-pre-major": true
}
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0