Skip to content

Commit 50910f1

Browse files
Project migration finalized
1 parent 189bc53 commit 50910f1

File tree

88 files changed

+3135
-1708
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+3135
-1708
lines changed

Diff for: .github/workflows/docker-publish.yml

+17-42
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Push SUA docker image
1+
name: Build and push docker container
22

33
on:
44
push:
@@ -12,7 +12,8 @@ env:
1212
IMAGE_NAME: sua
1313

1414
jobs:
15-
build_for_architecture:
15+
16+
build:
1617
strategy:
1718
matrix:
1819
architecture: [ arm64, amd64 ]
@@ -29,83 +30,57 @@ jobs:
2930
with:
3031
string: ${{ github.repository }}
3132

32-
- name: Find latest tag
33-
uses: oprypin/find-latest-tag@v1
34-
with:
35-
repository: ${{ github.repository }}
36-
releases-only: false
37-
id: build_tag
38-
3933
- name: Checkout repository
4034
uses: actions/checkout@v3
4135
with:
4236
submodules: recursive
4337

4438
# Workaround: https://github.com/docker/build-push-action/issues/461
4539
- name: Setup Docker buildx
46-
uses: docker/setup-buildx-action@v2
40+
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
4741

4842
# Login against a Docker registry except on PR
49-
# https://github.com/docker/login-action
5043
- name: Log into registry ${{ env.REGISTRY }}
51-
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
44+
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
5245
with:
5346
registry: ${{ env.REGISTRY }}
54-
username: ${{ github.repository_owner }}
47+
username: ${{ github.actor }}
5548
password: ${{ secrets.GITHUB_TOKEN }}
5649

57-
# Extract metadata (tags, labels) for Docker
58-
# https://github.com/docker/metadata-action
59-
- name: Extract Docker metadata
60-
id: meta
61-
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
62-
with:
63-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
64-
6550
# https://github.com/docker/build-push-action
66-
- name: Build and push Docker image to ghcr.io
67-
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
51+
- name: Build and push docker container to ghcr.io
52+
id: build-and-push
53+
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
6854
with:
6955
push: true
7056
context: .
7157
platforms: linux/${{ matrix.architecture }}
7258
file: Dockerfile.${{ matrix.architecture }}
7359
labels: ${{ steps.meta.outputs.labels }}
7460
tags: |
75-
${{ env.REGISTRY }}/${{ steps.repo_name.outputs.lowercase }}/${{ env.IMAGE_NAME }}:testing_${{ matrix.architecture}}
61+
${{ env.REGISTRY }}/${{ steps.repo_name.outputs.lowercase }}/${{ env.IMAGE_NAME }}:latest_${{ matrix.architecture}}
7662
7763
create-multiarch-image:
7864
runs-on: ubuntu-latest
79-
permissions:
80-
contents: read
81-
packages: write
82-
name: Create multiarch image
83-
needs: [build_for_architecture]
65+
name: Build multiarch container
66+
needs: [build]
8467

8568
steps:
8669
- id: repo_name
8770
uses: ASzc/change-string-case-action@v1
8871
with:
8972
string: ${{ github.repository }}
90-
91-
# Find the tag to use for versioning code
92-
- name: Find latest tag
93-
uses: oprypin/find-latest-tag@v1
94-
with:
95-
repository: ${{ github.repository }}
96-
releases-only: false
97-
id: build_tag
98-
73+
9974
- name: Log into registry ${{ env.REGISTRY }}
100-
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
75+
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
10176
with:
10277
registry: ${{ env.REGISTRY }}
103-
username: ${{ github.repository_owner }}
78+
username: ${{ github.actor }}
10479
password: ${{ secrets.GITHUB_TOKEN }}
10580

10681
- name: Create merged manifest and push
10782
env:
108-
REPO: ghcr.io/${{ steps.repo_name.outputs.lowercase }}
83+
REPO: ghcr.io/softwaredefinedvehicle/sdv-self-update-agent
10984
run: |
110-
docker buildx imagetools create -t ${{ env.REGISTRY }}/${{ steps.repo_name.outputs.lowercase }}/${{ env.IMAGE_NAME }}:testing ${{ env.REGISTRY }}/${{ steps.repo_name.outputs.lowercase }}/${{ env.IMAGE_NAME }}:testing_arm64 ${{ env.REGISTRY }}/${{ steps.repo_name.outputs.lowercase }}/${{ env.IMAGE_NAME }}:testing_amd64
85+
docker buildx imagetools create -t ${{ env.REGISTRY }}/${{ steps.repo_name.outputs.lowercase }}/${{ env.IMAGE_NAME }}:latest ${{ env.REGISTRY }}/${{ steps.repo_name.outputs.lowercase }}/${{ env.IMAGE_NAME }}:latest_arm64 ${{ env.REGISTRY }}/${{ steps.repo_name.outputs.lowercase }}/${{ env.IMAGE_NAME }}:latest_amd64
11186

Diff for: .github/workflows/native-build.yml

+30-12
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
name: CMake native build and unit tests
1+
name: Native build
22

33
on:
44
push:
55
pull_request:
66
branches: [ main ]
77

88
env:
9-
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
109
BUILD_TYPE: Release
1110

1211
jobs:
1312
build_for_architecture:
1413
strategy:
1514
matrix:
16-
arch: [amd64, arm64]
15+
arch: [ amd64, arm64 ]
1716
runs-on: [ ubuntu-latest ]
1817
steps:
1918
- uses: actions/checkout@v2
2019
with:
2120
submodules: recursive
2221

2322
# Remove apt repos that are known to break from time to time
24-
# See https://github.com/actions/virtual-environments/issues/323
2523
- name: Remove broken apt repos [Ubuntu]
2624
run: |
2725
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
@@ -39,27 +37,47 @@ jobs:
3937
libselinux1-dev libmount-dev libmount1 libblkid-dev
4038
pip3 install meson
4139
42-
- name: Configure CMake
43-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
44-
4540
- name: Build for ${{ matrix.arch }}
4641
run: |
4742
mkdir build_${{ matrix.arch }}
48-
ln -s build_${{ matrix.arch }} build
4943
./scripts/build_openssl_${{ matrix.arch }}.sh
5044
./scripts/build_glib_${{ matrix.arch }}.sh
5145
cd build_${{ matrix.arch }}
5246
cmake -DCMAKE_INSTALL_PREFIX=../dist_${{ matrix.arch }} -DCMAKE_TOOLCHAIN_FILE=../cmake/linux/${{ matrix.arch }}/toolchain.cmake -DOPENSSL_ROOT_DIR=../build_${{ matrix.arch }} -DOPENSSL_CRYPTO_LIBRARY=../build_${{ matrix.arch }}/lib/libcrypto.so ..
5347
make
48+
make install
5449
5550
- name: Run unit tests
56-
# execute tests only for the x86, as for arm the running on qemu would be required
5751
if: ${{ matrix.arch=='amd64' }}
5852
run: |
59-
LD_LIBRARY_PATH=./build_${{ matrix.arch }}/lib:./build_${{ matrix.arch }}/3rdparty ./build_${{ matrix.arch }}/utest/TestSDVSelfUpdateAgent
53+
cd dist_${{ matrix.arch }}/utest
54+
./TestSDVSelfUpdateAgent
55+
56+
- name: Compress artifacts
57+
run: tar -cvf sua_${{ matrix.arch }}.tar.gz --exclude=lib/cmake --exclude=lib/pkgconfig -C dist_${{ matrix.arch }} bin/sdv-self-update-agent lib
6058

6159
- name: Upload ${{ matrix.arch }} artifact to workspace
6260
uses: actions/upload-artifact@v3
6361
with:
64-
name: sdv-self-update-agent_${{ matrix.arch }}
65-
path: ${{github.workspace}}/build_${{ matrix.arch }}/src/sdv-self-update-agent
62+
name: sua_${{ matrix.arch }}.tar.gz
63+
path: sua_${{ matrix.arch }}.tar.gz
64+
65+
prerelease:
66+
name: Upload artifacts
67+
needs: [build_for_architecture]
68+
runs-on: ubuntu-latest
69+
70+
steps:
71+
- name: Download artifacts
72+
uses: actions/download-artifact@v2
73+
74+
- name: Upload artifacts to build results
75+
uses: marvinpinto/action-automatic-releases@latest
76+
with:
77+
repo_token: ${{ secrets.GITHUB_TOKEN }}
78+
draft: false
79+
prerelease: true
80+
automatic_release_tag: build_${{ github.run_number }}
81+
title: "Build ${{ github.run_number }}"
82+
files: "**/sua_*.tar.gz"
83+

Diff for: .github/workflows/release.yaml

-135
This file was deleted.

Diff for: .gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
[submodule "3rdparty/openssl"]
2323
path = 3rdparty/openssl
2424
url = https://github.com/openssl/openssl.git
25+
[submodule "3rdparty/nlohmann-json"]
26+
path = 3rdparty/nlohmann-json
27+
url = https://github.com/nlohmann/json

Diff for: .ort.yml

+12
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ excludes:
6060
- pattern: "3rdparty/curl/LICENSES/**"
6161
reason: "DOCUMENTATION_OF"
6262
comment: "Copies of various licenses, not in production release."
63+
- pattern: "3rdparty/nlohmann-json/docs/**"
64+
reason: "DOCUMENTATION_OF"
65+
comment: "Used in the generation of documentation, not in production release."
66+
- pattern: "3rdparty/nlohmann-json/.reuse/**"
67+
reason: "DOCUMENTATION_OF"
68+
comment: "Documents dependencies for tests, not in production release."
69+
- pattern: "3rdparty/nlohmann-json/LICENSES/**"
70+
reason: "DOCUMENTATION_OF"
71+
comment: "Details of licenses used, not in production release."
72+
- pattern: "3rdparty/nlohmann-json/tests/thirdparty/imapdl/**"
73+
reason: "TEST_OF"
74+
comment: "Tests of nlohmann-json, not included in production release"
6375
curations:
6476
license_findings:
6577
- path: "3rdparty/paho.mqtt.c/notice.html"

Diff for: 3rdparty/nlohmann-json

Submodule nlohmann-json added at 7f72eed

0 commit comments

Comments
 (0)