Skip to content

Commit

Permalink
Test various permutations of present and missing workflow inputs (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ximon18 authored Sep 14, 2022
1 parent 867f8a2 commit d46e74f
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 2 deletions.
84 changes: 82 additions & 2 deletions .github/workflows/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-<package>.sh

cross_build_args: --no-default-features
deb_extra_build_packages: libssl-dev
deb_maintainer: The NLnet Labs RPKI Team <rpki@nlnetlabs.nl>
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 <rpki@nlnetlabs.nl>
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
Expand All @@ -15,10 +55,50 @@ 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-<package>.sh

cross_build_args: --no-default-features
deb_extra_build_packages: libssl-dev
deb_maintainer: The NLnet Labs RPKI Team <rpki@nlnetlabs.nl>
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-<package>.sh

cross_build_args: --no-default-features
deb_extra_build_packages: libssl-dev
deb_maintainer: The NLnet Labs RPKI Team <rpki@nlnetlabs.nl>
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-<package>.sh

deb_extra_build_packages: libssl-dev
deb_maintainer: The NLnet Labs RPKI Team <rpki@nlnetlabs.nl>
rpm_extra_build_packages: openssl-devel
21 changes: 21 additions & 0 deletions pkg/rules/docker-images-to-build-no-cross.yml
Original file line number Diff line number Diff line change
@@ -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"
3 changes: 3 additions & 0 deletions pkg/rules/docker-images-to-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ include:
shortname: "armv6"
crosstarget: "arm-unknown-linux-musleabihf"
mode: "copy"
- platform: "linux/amd64"
shortname: "amd64"
mode: "build"
7 changes: 7 additions & 0 deletions pkg/rules/packages-to-build-no-cross.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
pkg:
- "mytest"
image:
- "ubuntu:jammy" # ubuntu/22.04
target:
- "x86_64"
1 change: 1 addition & 0 deletions pkg/rules/packages-to-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pkg:
- "mytest"
image:
- "ubuntu:jammy" # ubuntu/22.04
- "debian:stretch"
target:
- "x86_64"
include:
Expand Down
9 changes: 9 additions & 0 deletions pkg/rules/packages-to-test-no-cross.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
pkg:
- "mytest"
image:
- "ubuntu:jammy" # ubuntu/22.04
mode:
- "fresh-install"
target:
- "x86_64"
1 change: 1 addition & 0 deletions pkg/rules/packages-to-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d46e74f

Please sign in to comment.