diff --git a/.github/workflows/pkg.yml b/.github/workflows/pkg.yml index 86eb7c0..aa05b8e 100644 --- a/.github/workflows/pkg.yml +++ b/.github/workflows/pkg.yml @@ -4,9 +4,49 @@ on: push: workflow_dispatch: +# TODO: Use a matrix here for the different permutations of settings to invoke the reusable workflow with? + jobs: - package: - uses: NLnetLabs/.github/.github/workflows/pkg-rust.yml@v1 + full: + uses: NLnetLabs/.github/.github/workflows/pkg-rust.yml@fix_docker_org_is_required + secrets: inherit + with: + docker_org: ximoneighteen + docker_repo: ximontest + + cross_build_rules_path: pkg/rules/cross-targets.yml + docker_build_rules_path: pkg/rules/docker-images-to-build.yml + package_build_rules_path: pkg/rules/packages-to-build.yml + package_test_rules_path: pkg/rules/packages-to-test.yml + package_test_scripts_path: pkg/test-scripts/test-.sh + + cross_build_args: --no-default-features + deb_extra_build_packages: libssl-dev + deb_maintainer: The NLnet Labs RPKI Team + rpm_extra_build_packages: openssl-devel + + minimal: + uses: NLnetLabs/.github/.github/workflows/pkg-rust.yml@fix_docker_org_is_required + + no_test_scripts: + uses: NLnetLabs/.github/.github/workflows/pkg-rust.yml@fix_docker_org_is_required + secrets: inherit + with: + docker_org: ximoneighteen + docker_repo: ximontest + + cross_build_rules_path: pkg/rules/cross-targets.yml + docker_build_rules_path: pkg/rules/docker-images-to-build.yml + package_build_rules_path: pkg/rules/packages-to-build.yml + package_test_rules_path: pkg/rules/packages-to-test.yml + + cross_build_args: --no-default-features + deb_extra_build_packages: libssl-dev + deb_maintainer: The NLnet Labs RPKI Team + rpm_extra_build_packages: openssl-devel + + no_tests: + uses: NLnetLabs/.github/.github/workflows/pkg-rust.yml@fix_docker_org_is_required secrets: inherit with: docker_org: ximoneighteen @@ -15,6 +55,18 @@ jobs: cross_build_rules_path: pkg/rules/cross-targets.yml docker_build_rules_path: pkg/rules/docker-images-to-build.yml package_build_rules_path: pkg/rules/packages-to-build.yml + package_test_scripts_path: pkg/test-scripts/test-.sh + + cross_build_args: --no-default-features + deb_extra_build_packages: libssl-dev + deb_maintainer: The NLnet Labs RPKI Team + rpm_extra_build_packages: openssl-devel + + no_docker: + uses: NLnetLabs/.github/.github/workflows/pkg-rust.yml@fix_docker_org_is_required + with: + cross_build_rules_path: pkg/rules/cross-targets.yml + package_build_rules_path: pkg/rules/packages-to-build.yml package_test_rules_path: pkg/rules/packages-to-test.yml package_test_scripts_path: pkg/test-scripts/test-.sh @@ -22,3 +74,31 @@ jobs: deb_extra_build_packages: libssl-dev deb_maintainer: The NLnet Labs RPKI Team rpm_extra_build_packages: openssl-devel + + only_docker: + uses: NLnetLabs/.github/.github/workflows/pkg-rust.yml@fix_docker_org_is_required + secrets: inherit + with: + docker_org: ximoneighteen + docker_repo: ximontest + + cross_build_rules_path: pkg/rules/cross-targets.yml + docker_build_rules_path: pkg/rules/docker-images-to-build.yml + + cross_build_args: --no-default-features + + no_cross: + uses: NLnetLabs/.github/.github/workflows/pkg-rust.yml@fix_docker_org_is_required + secrets: inherit + with: + docker_org: ximoneighteen + docker_repo: ximontest + + docker_build_rules_path: pkg/rules/docker-images-to-build-no-cross.yml + package_build_rules_path: pkg/rules/packages-to-build-no-cross.yml + package_test_rules_path: pkg/rules/packages-to-test-no-cross.yml + package_test_scripts_path: pkg/test-scripts/test-.sh + + deb_extra_build_packages: libssl-dev + deb_maintainer: The NLnet Labs RPKI Team + rpm_extra_build_packages: openssl-devel diff --git a/pkg/rules/docker-images-to-build-no-cross.yml b/pkg/rules/docker-images-to-build-no-cross.yml new file mode 100644 index 0000000..cd790d8 --- /dev/null +++ b/pkg/rules/docker-images-to-build-no-cross.yml @@ -0,0 +1,21 @@ +--- +# matrix field notes: +# platform: used by Docker to use the right architecture base image. +# the set of supported values can be seen at: +# https://go.dev/doc/install/source#environment +# from: https://github.com/docker-library/official-images#architectures-other-than-amd64 +# from: https://docs.docker.com/desktop/multi-arch/ +# one must also take any "normalization" into account, e.g. arm64v8 -> arm64, see: +# https://github.com/containerd/containerd/blob/v1.4.3/platforms/database.go#L83 +# see also: +# https://stackoverflow.com/a/70889505 +# shortname: used by us to tag the architecture specific "manifest" image. +# crosstarget: (optional) used to download the correct cross-compiled binary that was produced earlier by the +# 'cross' job above. +# mode: (optional) set to 'copy' for cross-compiled targets. +# cargo_args: (optional) can be used when testing, e.g. set to '--no-default-features' to speed up the Krill +# build. +include: + - platform: "linux/amd64" + shortname: "amd64" + mode: "build" diff --git a/pkg/rules/docker-images-to-build.yml b/pkg/rules/docker-images-to-build.yml index dac0793..2d7fb57 100644 --- a/pkg/rules/docker-images-to-build.yml +++ b/pkg/rules/docker-images-to-build.yml @@ -20,3 +20,6 @@ include: shortname: "armv6" crosstarget: "arm-unknown-linux-musleabihf" mode: "copy" + - platform: "linux/amd64" + shortname: "amd64" + mode: "build" diff --git a/pkg/rules/packages-to-build-no-cross.yml b/pkg/rules/packages-to-build-no-cross.yml new file mode 100644 index 0000000..491321e --- /dev/null +++ b/pkg/rules/packages-to-build-no-cross.yml @@ -0,0 +1,7 @@ +--- +pkg: + - "mytest" +image: + - "ubuntu:jammy" # ubuntu/22.04 +target: + - "x86_64" diff --git a/pkg/rules/packages-to-build.yml b/pkg/rules/packages-to-build.yml index 626a5bc..b0d4672 100644 --- a/pkg/rules/packages-to-build.yml +++ b/pkg/rules/packages-to-build.yml @@ -3,6 +3,7 @@ pkg: - "mytest" image: - "ubuntu:jammy" # ubuntu/22.04 + - "debian:stretch" target: - "x86_64" include: diff --git a/pkg/rules/packages-to-test-no-cross.yml b/pkg/rules/packages-to-test-no-cross.yml new file mode 100644 index 0000000..5f0cc1a --- /dev/null +++ b/pkg/rules/packages-to-test-no-cross.yml @@ -0,0 +1,9 @@ +--- +pkg: + - "mytest" +image: + - "ubuntu:jammy" # ubuntu/22.04 +mode: + - "fresh-install" +target: + - "x86_64" diff --git a/pkg/rules/packages-to-test.yml b/pkg/rules/packages-to-test.yml index 5f0cc1a..3b72101 100644 --- a/pkg/rules/packages-to-test.yml +++ b/pkg/rules/packages-to-test.yml @@ -3,6 +3,7 @@ pkg: - "mytest" image: - "ubuntu:jammy" # ubuntu/22.04 + - "debian:stretch" # should get excluded because the LXC image no longer exists mode: - "fresh-install" target: