-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Andreas Heinrich <[email protected]>
- Loading branch information
Showing
2 changed files
with
81 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/bin/sh | ||
|
||
cmake \ | ||
-B build \ | ||
-B "$EXT_MOUNT/build" \ | ||
-S "$EXT_MOUNT/source" \ | ||
-G Ninja \ | ||
-DEVC_ENABLE_CCACHE=1 \ | ||
-DISO15118_2_GENERATE_AND_INSTALL_CERTIFICATES=OFF \ | ||
-DCMAKE_INSTALL_PREFIX="$WORKSPACE_PATH/dist" \ | ||
-DCMAKE_INSTALL_PREFIX="$EXT_MOUNT/dist" \ | ||
-DBUILD_TESTING=ON | ||
|
||
ninja -j$(nproc) -C build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,14 +15,29 @@ on: | |
- cron: '37 13,1 * * *' | ||
|
||
jobs: | ||
build: | ||
name: Build, Lint and Test | ||
lint: | ||
name: Lint | ||
runs-on: ${{ inputs.runner || 'ubuntu-22.04' }} | ||
steps: | ||
- name: Checkout everest-core | ||
uses: actions/checkout@v3 | ||
with: | ||
path: source | ||
- name: Run clang-format | ||
uses: everest/everest-ci/github-actions/[email protected] | ||
with: | ||
source-dir: source | ||
extensions: hpp, cpp | ||
compile: | ||
name: Configure and Compile | ||
runs-on: ${{ inputs.runner || 'ubuntu-22.04' }} | ||
steps: | ||
# LTODO: use github actions outputs or custom github actions | ||
- name: Format branch name for cache key | ||
run: | | ||
BRANCH_NAME_FOR_CACHE="${GITHUB_REF_NAME//-/_}" | ||
echo "branch_name_for_cache=${BRANCH_NAME_FOR_CACHE}" >> "$GITHUB_ENV" | ||
# LTODO: use compile-main ?? | ||
- name: Setup cache | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -35,12 +50,6 @@ jobs: | |
uses: actions/checkout@v3 | ||
with: | ||
path: source | ||
- name: Run clang-format | ||
uses: everest/everest-ci/github-actions/[email protected] | ||
with: | ||
source-dir: source | ||
extensions: hpp,cpp | ||
exclude: cache | ||
- name: Setup run scripts | ||
run: | | ||
mkdir scripts | ||
|
@@ -55,21 +64,79 @@ jobs: | |
--volume "$(pwd):/ext" \ | ||
--name compile-container \ | ||
build-kit run-script compile | ||
- name: Commit compile-container | ||
- name: Upload build directory | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build-directory | ||
path: ${{ github.workspace }}/build | ||
- name: Upload dist directory | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist-directory | ||
path: ${{ github.workspace }}/dist | ||
run-unit-tests: | ||
needs: | ||
- compile | ||
name: Run Unit Tests | ||
runs-on: ${{ inputs.runner || 'ubuntu-22.04' }} | ||
steps: | ||
- name: Download build directory | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: build-directory | ||
path: ${{ github.workspace }}/build | ||
- name: Download dist directory | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dist-directory | ||
path: ${{ github.workspace }}/dist | ||
- name: Checkout everest-core | ||
uses: actions/checkout@v3 | ||
with: | ||
path: source | ||
- name: Setup run scripts | ||
run: | | ||
mkdir scripts | ||
rsync -a source/.ci/build-kit/ scripts | ||
- name: Pull build-kit image | ||
run: | | ||
docker commit compile-container build-image | ||
docker pull --quiet ghcr.io/everest/build-kit-alpine:latest | ||
docker image tag ghcr.io/everest/build-kit-alpine:latest build-kit | ||
- name: Run unit tests | ||
run: | | ||
docker run \ | ||
--volume "$(pwd):/ext" \ | ||
--name unit-tests-container \ | ||
build-image run-script run_unit_tests | ||
build-kit run-script run_unit_tests | ||
run-integration-tests: | ||
needs: | ||
- compile | ||
name: Run Integration Tests | ||
runs-on: ${{ inputs.runner || 'ubuntu-22.04' }} | ||
steps: | ||
- name: Download dist directory | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dist-directory | ||
path: ${{ github.workspace }}/dist | ||
- name: Checkout everest-core | ||
uses: actions/checkout@v3 | ||
with: | ||
path: source | ||
- name: Setup run scripts | ||
run: | | ||
mkdir scripts | ||
rsync -a source/.ci/build-kit/ scripts | ||
- name: Pull build-kit image | ||
run: | | ||
docker pull --quiet ghcr.io/everest/build-kit-alpine:latest | ||
docker image tag ghcr.io/everest/build-kit-alpine:latest build-kit | ||
- name: Create integration-image | ||
run: | | ||
docker run \ | ||
--volume "$(pwd):/ext" \ | ||
--name test-container \ | ||
build-image run-script prepare_integration_tests | ||
build-kit run-script prepare_integration_tests | ||
docker commit test-container integration-image | ||
- name: Run integration tests | ||
run: | | ||
|