-
Notifications
You must be signed in to change notification settings - Fork 87
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
ci: Split up in multiple jobs #633
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,15 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
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 | ||
ninja -j$(nproc) -C "$EXT_MOUNT/build" | ||
ninja -j$(nproc) -C "$EXT_MOUNT/build" install |
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,11 +1,10 @@ | ||
#!/bin/sh | ||
|
||
# ninja -j$(nproc) -C build tests | ||
ninja -j$(nproc) -C build install | ||
set -e | ||
|
||
# install everest testing by cmake target to make sure using the version defined in dependencies.yaml | ||
ninja -C build install_everest_testing | ||
ninja -C "$EXT_MOUNT/build" install_everest_testing | ||
|
||
rsync -a "$EXT_MOUNT/source/tests" ./ | ||
|
||
rm -rf build | ||
rm -rf "$EXT_MOUNT/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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/bin/sh | ||
|
||
ninja -j$(nproc) -C build test | ||
set -e | ||
|
||
ninja -j$(nproc) -C "$EXT_MOUNT/build" test |
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,4 +1,6 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
cd tests | ||
pytest --everest-prefix ../dist core_tests/*.py framework_tests/*.py |
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 ?? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DO NOT MERGE |
||
- 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,84 @@ 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 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 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: | | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DO NOT MERGE