Skip to content

Remove dependencies to URL crate #1394

Remove dependencies to URL crate

Remove dependencies to URL crate #1394

Workflow file for this run

name: Build
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
workflow_call:
env:
CARGO_TERM_COLOR: always
concurrency:
group: "build-${{ github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
build_and_system_tests_linux_amd64:
name: Build and run system tests Linux amd64
runs-on: ubuntu-latest
container:
image: ghcr.io/eclipse-ankaios/devcontainer-base:0.9.1
options: --privileged
steps:
- uses: actions/checkout@v4.1.1
- name: Build debug
run: cargo build
- name: Run system tests
run: |
mkdir -p target/robot_tests_result
chown vscode target/robot_tests_result
if [ ${{ github.event_name == 'pull_request' }} ]; then
SYSTEM_TEST_EXCLUDE_TAG="non_execution_during_pull_request_verification"
echo "Run is a PR verification, system tests tagged with '$SYSTEM_TEST_EXCLUDE_TAG' are NOT executed and skipped."
su vscode -c "tools/run_robot_tests.sh --exclude $SYSTEM_TEST_EXCLUDE_TAG tests"
else
echo "Run is not a PR verification, all system tests are executed."
su vscode -c "tools/run_robot_tests.sh tests"
fi
- uses: actions/upload-artifact@v4.3.3
if: success() || failure()
with:
name: robot-tests-result
path: target/robot_tests_result
unit_tests_and_code_checks_linux_amd64:
name: Run unit tests Linux amd64
runs-on: ubuntu-latest
container:
image: ghcr.io/eclipse-ankaios/devcontainer-base:0.9.1
options: --privileged
steps:
- uses: actions/checkout@v4.1.1
- name: Run unit tests
run: RUST_LOG=debug cargo nextest run
- name: Run clippy code checks
run: cargo clippy --all-targets --no-deps --all-features -- -D warnings
# If the next step fails, then a license used by a new dependency is currently
# not part of the whitelist in deny.toml. If the new license fits to the project
# then it should be added to the whitelist otherwise the dependency needs to be
# removed.
- name: Check licenses
run: cargo deny check licenses
- name: Create license report
run: |
mkdir -p build
cargo about generate about.hbs > build/licenses.html
- uses: actions/upload-artifact@v4.3.3
with:
name: licenses
path: build/licenses.html
code_coverage_linux_amd64:
name: Create code coverage report
runs-on: ubuntu-latest
container:
image: ghcr.io/eclipse-ankaios/devcontainer-base:0.9.1
options: --privileged
steps:
- uses: actions/checkout@v4.1.1
- name: Create code coverage html report
run: |
rustup component add llvm-tools-preview
tools/generate_test_coverage_report.sh test --html
- uses: actions/upload-artifact@v4.3.3
with:
name: code-coverage
path: target/llvm-cov/html
build_linux_amd64_debian_package:
name: Build Linux amd64 debian package
runs-on: ubuntu-latest
container:
image: ghcr.io/eclipse-ankaios/devcontainer-base:0.9.1
options: --privileged
steps:
- uses: actions/checkout@v4.1.1
- name: Build linux-amd64 release-mode
run: |
cargo build --release
mkdir -p dist/
cp target/x86_64-unknown-linux-musl/release/ank target/x86_64-unknown-linux-musl/release/ank-server target/x86_64-unknown-linux-musl/release/ank-agent dist/
- uses: actions/upload-artifact@v4.3.3
with:
name: ankaios-linux-amd64-bin
path: dist/
- name: Build linux-amd64 debian package
run: |
cargo deb -p ank --target x86_64-unknown-linux-musl
- uses: actions/upload-artifact@v4.3.3
with:
name: ankaios-linux-amd64-deb
path: target/x86_64-unknown-linux-musl/debian/ankaios*.deb
build_linux_arm64:
# currently there is no arm64 github built-in runner available
# however, there is an issue in progress on the github runner repo
# requesting the support for arm64: https://github.com/actions/runner-images/issues/5631
# if arm64 variants will be released we can switch to an arm64 image and save the longer built time for cross platform build
# and in addition, tests for arm64 can be enabled in this job, too
name: Build Linux arm64 debian package
runs-on: ubuntu-latest
container:
image: ghcr.io/eclipse-ankaios/devcontainer-base:0.9.1
options: --user root
steps:
- uses: actions/checkout@v4.1.1
- name: Build linux-arm64 release-mode
run: |
cargo build --target aarch64-unknown-linux-musl --release
mkdir -p dist/
cp target/aarch64-unknown-linux-musl/release/ank target/aarch64-unknown-linux-musl/release/ank-server target/aarch64-unknown-linux-musl/release/ank-agent dist/
- uses: actions/upload-artifact@v4.3.3
with:
name: ankaios-linux-arm64-bin
path: dist/
- name: Build linux-arm64 debian package
run: |
cargo deb -p ank --target aarch64-unknown-linux-musl
- uses: actions/upload-artifact@v4.3.3
with:
name: ankaios-linux-arm64-deb
path: target/aarch64-unknown-linux-musl/debian/ankaios*.deb
requirements:
name: Build requirements tracing
runs-on: ubuntu-latest
container:
image: ghcr.io/eclipse-ankaios/devcontainer-base:0.9.1
options: --user root
steps:
- uses: actions/checkout@v4.1.1
- run: |
mkdir -p dist
oft trace $(find . -type d -name "src" -o -name "doc") -a swdd,utest,itest,stest,impl -o html -f dist/req_tracing_report.html || true
- uses: actions/upload-artifact@v4.3.3
with:
name: requirement-tracing-report
path: dist/