diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 68f41895e5e5e887f8fb28ecbdd520a2c935dd0a..5bad8b01bc889f47a31f8aa16ed502a65dde9dca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,61 +1,11 @@ -include: - - component: "${CI_SERVER_HOST}/ci/component/bazelisk/ruleset@v1.0.1" - inputs: - needs: - - oci - - format-check - versions: - - 7.4.0 - - 7.x - configs: - - local - # FIXME: enable remote builds - #- remote - oses: - - linux - -default: +test: + stage: test + image: registry.gitlab.arm.com/ci/component/bazelisk:1.0.1 tags: - - arm64 - -oci: - stage: .pre - image: docker:27.3.0 - tags: - - dind - services: - - docker:27.3.0-dind - variables: - DOCKER_TLS_CERTDIR: "/certs" - DOCKER_HOST: tcp://docker:2376 - DOCKER_TLS_VERIFY: "true" - DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client" - HEALTHCHECK_TCP_PORT: "2376" - script: - - docker info - - echo "$CI_REGISTRY_PASSWORD" | docker login --username "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY" - - docker buildx build --tag="$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA" --push --cache-from "type=registry,ref=$CI_REGISTRY_IMAGE:$CI_COMMIT_BEFORE_SHA" --build-arg BUILDKIT_INLINE_CACHE=1 . - rules: !reference [.bazelisk, rules] - -format-check: - stage: .pre - image: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}" - extends: .job - needs: - - oci - script: - # `rules_lint` uses non-hermetic Git unless we give it these arguments - - bazelisk run //tools/format:format.check -- . --disable_git_attribute_checks - -pages: - stage: deploy - extends: .job - needs: - - oci + - arm64/metal + parallel: + matrix: + - FOO: [1, 2, 3] + BAR: [4, 5, 6] script: - - bazelisk run docs:public - artifacts: - paths: - - public - rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - cd e2e; bazelisk test --test_env=FOO=${FOO} --test_env=BAR=${BAR} //... diff --git a/e2e/qemu/BUILD.bazel b/e2e/qemu/BUILD.bazel deleted file mode 100644 index ae997e9844a4c638674545a65e8281e9c2d5fbff..0000000000000000000000000000000000000000 --- a/e2e/qemu/BUILD.bazel +++ /dev/null @@ -1,55 +0,0 @@ -load("@rules_diff//diff/file/test:defs.bzl", "diff_file_test") -load("@rules_labgrid//labgrid/run:defs.bzl", "labgrid_run") -load("@rules_labgrid//labgrid/test:defs.bzl", "labgrid_test") -load("@rules_python//python:defs.bzl", "py_binary") - -CPUS = ("amd64",) - -[ - labgrid_run( - name = "os-release-{}".format(cpu), - srcs = ["@ape//ape:cat"], - outs = ["stdout-{}.log".format(cpu)], - cmd = "$(location @ape//ape:cat) /etc/os-release > $@", - platform = "@rules_labgrid//platform:qemu-{}-linux".format(cpu), - ) - for cpu in CPUS -] - -[ - diff_file_test( - name = "run-{}".format(cpu), - size = "small", - a = ":release.txt", - b = ":stdout-{}.log".format(cpu), - ) - for cpu in CPUS -] - -test_suite( - name = "run", - tests = ["run-{}".format(cpu) for cpu in CPUS], -) - -py_binary( - name = "inner", - srcs = ["test_release.py"], - data = [":release.txt"], - main = "test_release.py", - deps = ["@rules_python//python/runfiles"], -) - -[ - labgrid_test( - name = "test-{}".format(cpu), - size = "large", - src = ":inner", - platform = "@rules_labgrid//platform:qemu-{}-linux".format(cpu), - ) - for cpu in CPUS -] - -test_suite( - name = "test", - tests = ["test-{}".format(cpu) for cpu in CPUS], -) diff --git a/e2e/qemu/release.txt b/e2e/qemu/release.txt deleted file mode 100644 index 3320862178e5a63681c384aa77ab6998f5655b1c..0000000000000000000000000000000000000000 --- a/e2e/qemu/release.txt +++ /dev/null @@ -1,9 +0,0 @@ -PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" -NAME="Debian GNU/Linux" -VERSION_ID="12" -VERSION="12 (bookworm)" -VERSION_CODENAME=bookworm -ID=debian -HOME_URL="https://www.debian.org/" -SUPPORT_URL="https://www.debian.org/support" -BUG_REPORT_URL="https://bugs.debian.org/" diff --git a/e2e/qemu/test_release.py b/e2e/qemu/test_release.py deleted file mode 100644 index 7bb5844e27f4d6fd52e72801f994906906641e39..0000000000000000000000000000000000000000 --- a/e2e/qemu/test_release.py +++ /dev/null @@ -1,22 +0,0 @@ -import unittest -from pathlib import Path - -from python.runfiles import Runfiles - - -def _cat(path): - return Path(path).read_text() - - -def _runfile(path): - r = Runfiles.Create() - return _cat(r.Rlocation(path)) - - -class ReleaseTestCase(unittest.TestCase): - def test(self): - self.assertEqual(_cat("/etc/os-release"), _runfile("_main/qemu/release.txt")) - - -if __name__ == "__main__": - unittest.main()