Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: cleanup main #440

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
37923a0
refactor: cleanup main
subotic Apr 9, 2024
fedfd86
refactor: cleanup main
subotic Apr 9, 2024
77510e2
refactor: cleanup main
subotic Apr 9, 2024
1409a21
chore: add otel instrumentation
subotic Apr 10, 2024
259e2d6
chore: add otel instrumentation
subotic Apr 11, 2024
045e019
chore: add otel instrumentation
subotic Apr 13, 2024
828d05d
chore: add otel instrumentation
subotic Apr 14, 2024
0f45920
inih_inireader_LIBRARIES
subotic Apr 16, 2024
c7882b5
build: fix building with LLVM/clang++
subotic Apr 16, 2024
236c359
build: fix building with LLVM/clang++
subotic Apr 18, 2024
11cb4aa
build: fix building with LLVM/clang++
subotic Apr 18, 2024
1cde980
build: refactoring
subotic Apr 19, 2024
e3cbfb7
build: refactoring
subotic Apr 19, 2024
648d2ee
build: refactoring
subotic Apr 19, 2024
5ed2ab9
build: refactoring
subotic Apr 20, 2024
6f5cf3f
ci: change coverage to use llvm-cov
subotic Apr 20, 2024
5568732
ci: fix git issues
subotic Apr 20, 2024
973c192
build: refactoring
subotic Apr 21, 2024
843e2b5
build: use nix for patched libtiff (ongoing)
subotic Apr 21, 2024
5a13b8f
build: use nix for patched libtiff (ongoing)
subotic Apr 21, 2024
573bece
build: use nix for patched libtiff (ongoing)
subotic Apr 21, 2024
5df81d1
build: use nix for patched libtiff (ongoing)
subotic Apr 22, 2024
8c48d76
build: use nix for patched libtiff (ongoing)
subotic Apr 25, 2024
8eb7c54
build: use nix for patched libtiff (ongoing)
subotic Apr 26, 2024
7af3bc3
build: works with llvm and libcxx
subotic Apr 26, 2024
fdd7c96
build: works with llvm and libcxx (only on darwin)
subotic Apr 26, 2024
0026015
docs: update readme with Nix instructions
subotic Apr 26, 2024
6f39903
build: working on package.nix
subotic Apr 30, 2024
057fd93
ci: add decrypting of files with git-crypt
subotic Apr 30, 2024
adf19b9
ci: add cachix cache
subotic Apr 30, 2024
98ea1e3
build: update flake lock file
subotic Apr 30, 2024
17321ec
ci: change coverage command needed for gcc
subotic Apr 30, 2024
291fe89
ci: fix git issues
subotic Apr 30, 2024
5aed77e
ci: fix building and testing
subotic Apr 30, 2024
58fd070
ci: fix git issues
subotic Apr 30, 2024
f805394
ci: fix git issues
subotic Apr 30, 2024
d92bfb6
ci: fix git issues
subotic Apr 30, 2024
5498820
ci: fix git issues
subotic Apr 30, 2024
0eb0774
ci: fix git issues
subotic Apr 30, 2024
23993eb
ci: fix git issues
subotic Apr 30, 2024
8b4ed0f
ci: fix git issues
subotic Apr 30, 2024
cf7622d
build: add building with nix on darwin
subotic May 1, 2024
00d0a09
chore: ignore nix result folder
subotic May 1, 2024
6d89738
build: add building with nix on darwin
subotic May 1, 2024
792ffd7
build: simplified test setup
subotic May 2, 2024
e59d93f
build: add building with nix on linux
subotic May 4, 2024
cb7be40
build: kakadu with nix
subotic May 4, 2024
7da84e9
build: kakadu with nix
subotic May 5, 2024
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
Binary file modified .envrc
Binary file not shown.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vendor/** filter=git-crypt diff=git-crypt
.envrc filter=git-crypt diff=git-crypt
nix-overlays/kakadu/v8_4_1-01382N.zip filter=git-crypt diff=git-crypt
7 changes: 7 additions & 0 deletions .github/actions/checkout/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
DASCHBOT_PAT:
description: "daschbot's private access token"
required: true
GIT_CRYPT_KEY:
description: "The key to decrypt files with git-crypt"
required: true

runs:
using: "composite"
Expand All @@ -12,6 +15,10 @@ runs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Unlock secrets
uses: sliteteam/[email protected]
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
- name: checkout private ci-assets
uses: actions/checkout@v4
with:
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ jobs:
- uses: dasch-swiss/sipi/.github/actions/checkout@main
with:
DASCHBOT_PAT: ${{ secrets.DASCHBOT_PAT }}
- uses: extractions/setup-just@v1
- uses: dasch-swiss/sipi/.github/actions/setup-python@main
- run: make install-requirements
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- run: make docker-test-build-amd64 # two stage build, where test is run in the first stage
- run: make test-smoke-ci
- run: just docker-build-amd64 # two stage build, where test is run in the first stage
- run: just smoke-test-ci

# Docker build for aarch64
build_aarch64:
Expand All @@ -37,27 +38,34 @@ jobs:
group: ${{ github.ref }}-docker-build-aarch64
cancel-in-progress: true
steps:
- uses: dasch-swiss/sipi/.github/actions/checkout@main
- name: checkout source
uses: actions/checkout@v4
with:
DASCHBOT_PAT: ${{ secrets.DASCHBOT_PAT }}
fetch-depth: 0
- name: Unlock secrets
uses: sliteteam/[email protected]
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
- uses: extractions/setup-just@v1
- uses: dasch-swiss/sipi/.github/actions/setup-python@main
- run: make install-requirements
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- run: make docker-test-build-aarch64 # two stage build, where test is run in the first stage
- run: make test-smoke-ci
- run: just docker-build-aarch64 # two stage build, where test is run in the first stage
- run: just smoke-test-ci

# build documentation
build_docs:
name: docs test run
runs-on: ubuntu-latest
steps:
- uses: dasch-swiss/sipi/.github/actions/checkout@main
- name: checkout source
uses: actions/checkout@v4
with:
DASCHBOT_PAT: ${{ secrets.DASCHBOT_PAT }}
fetch-depth: 0
- uses: dasch-swiss/sipi/.github/actions/setup-python@main
- run: make docs-install-requirements
- run: make docs-build
18 changes: 14 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ jobs:
group: ${{ github.ref }}-publish-amd64
cancel-in-progress: true
steps:
- uses: dasch-swiss/sipi/.github/actions/checkout@main
- name: checkout source
uses: actions/checkout@v4
with:
DASCHBOT_PAT: ${{ secrets.DASCHBOT_PAT }}
fetch-depth: 0
- name: Unlock secrets
uses: sliteteam/[email protected]
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
- uses: dasch-swiss/sipi/.github/actions/setup-python@main
- run: make install-requirements
- uses: docker/setup-buildx-action@v3
Expand All @@ -36,9 +41,14 @@ jobs:
group: ${{ github.ref }}-publish-aarch64
cancel-in-progress: true
steps:
- uses: dasch-swiss/sipi/.github/actions/checkout@main
- name: checkout source
uses: actions/checkout@v4
with:
DASCHBOT_PAT: ${{ secrets.DASCHBOT_PAT }}
fetch-depth: 0
- name: Unlock secrets
uses: sliteteam/[email protected]
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
- uses: dasch-swiss/sipi/.github/actions/setup-python@main
- run: make install-requirements
- uses: docker/setup-buildx-action@v3
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@ jobs:
compiler: [ gcc ]
runs-on: [ buildjet-4vcpu-ubuntu-2204, buildjet-4vcpu-ubuntu-2204-arm ]
steps:
- uses: dasch-swiss/sipi/.github/actions/checkout@main
- name: checkout source
uses: actions/checkout@v4
with:
DASCHBOT_PAT: ${{ secrets.DASCHBOT_PAT }}
fetch-depth: 0
- uses: extractions/setup-just@v1
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GH_TOKEN }}
- run: |
nix \
--extra-experimental-features "nix-command flakes" \
--option filter-syscalls false \
develop --command bash -c "cmake -S . -B ./build -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug --log-context && cmake --build ./build --parallel 4 && cd build && ctest --output-on-failure"
- name: fix git config
run: |
git config --global --unset http.proxy
git config --global --unset https.proxy
- name: Build and run tests
run: nix develop --command bash -c "cmake -S . -B ./build -DCODE_COVERAGE:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Debug --log-context && cmake --build ./build --parallel 4 && ctest --test-dir ./build/test --parallel --output-on-failure"
- name: Gather code coverage
if: ${{ matrix.runs-on == 'buildjet-4vcpu-ubuntu-2204' }}
run: |
nix \
--extra-experimental-features "nix-command flakes" \
--option filter-syscalls false \
develop --command bash -c "cd build && gcovr -j 1 --delete --root ../ --print-summary --xml-pretty --xml coverage.xml . --gcov-executable gcov --gcov-ignore-parse-errors=negative_hits.warn_once_per_file"
run: nix develop --command bash -c "cd build && gcovr -j 1 --delete --root ../ --print-summary --xml-pretty --xml coverage.xml . --gcov-executable gcov --gcov-ignore-parse-errors=negative_hits.warn_once_per_file"
- name: Upload coverage reports to Codecov
if: ${{ matrix.runs-on == 'buildjet-4vcpu-ubuntu-2204' }}
uses: codecov/[email protected]
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ sipi
sipi.log*
/extsrcs/
.direnv/
/tmp/

target
__pycache__/
Expand All @@ -43,6 +44,7 @@ cmake-build-debug-inside-docker/
cmake-build-dockerdebug/
cmake-build-relwithdebinfo-inside-docker/
cmake-build-relwithdebinfo-nix-develop/
result/
# ignore cache
cache/

Expand All @@ -62,3 +64,4 @@ icc.zip
/coverage
/coverage.info
*.gcov
result
Loading
Loading