diff --git a/.aspect/workflows/README.md b/.aspect/workflows/README.md deleted file mode 100644 index 6fb320e..0000000 --- a/.aspect/workflows/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Aspect Workflows demonstration deployment - -This deployment of [Aspect Workflows](https://www.aspect.build/workflows) is configured to run on GCP + GitHub Actions. - -You can see this Aspect Workflows demonstration deployment live at -https://github.com/aspect-build/rules_jasmine/actions/workflows/aspect-workflows.yaml. - -The two components of the configuration in this repository are, - -1. Aspect Workflows configuration yaml -1. GitHub Actions workflows configurations - -## Aspect Workflows configuration yaml - -This is the [config.yaml](./config.yaml) file in this directory. - -## GitHub Actions workflows configurations - -This includes 3 files: - -1. [.github/workflows/aspect-workflows.yaml](../../.github/workflows/aspect-workflows.yaml) : Aspect Workflows CI workflow - -1. [.github/workflows/aspect-workflows-warming.yaml](../../.github/workflows/aspect-workflows-warming.yaml) : Aspect Workflows warming cron workflow - -1. [.github/workflows/.aspect-workflows-reusable.yaml](../../.github/workflows/.aspect-workflows-reusable.yaml) : Aspect Workflows Reusable Workflow for GitHub Actions. - This files is kept up-to date with the [upstream](https://github.com/aspect-build/workflows-action/blob/main/.github/workflows/.aspect-workflows-reusable.yaml) source-of-truth with a `write_source_file` target in [.github/workflows/BUILD.bazel](../../.github/workflows/BUILD.bazel). diff --git a/.aspect/workflows/bazelrc b/.aspect/workflows/bazelrc index 86088e5..33fb1ce 100644 --- a/.aspect/workflows/bazelrc +++ b/.aspect/workflows/bazelrc @@ -2,12 +2,10 @@ common --remote_download_outputs=minimal common --nobuild_runfile_links -# Allows tests to run bazelisk-in-bazel, since this is the cache folder used -common --test_env=XDG_CACHE_HOME - -common:rbe --extra_execution_platforms=@aspect_bazel_lib//platforms:x86_64_linux_remote -common:rbe --host_platform=@aspect_bazel_lib//platforms:x86_64_linux_remote +# remote execution +common:rbe --extra_execution_platforms=//bazel/platforms:x86_64_linux_remote +common:rbe --host_platform=//bazel/platforms:x86_64_linux_remote common:rbe --remote_executor=unix:///mnt/ephemeral/buildbarn/.cache/bb_clientd/grpc common:rbe --genrule_strategy=remote,local common:rbe --jobs=32 -common:rbe --remote_timeout=3600 \ No newline at end of file +common:rbe --remote_timeout=3600 diff --git a/.aspect/workflows/config.yaml b/.aspect/workflows/config.yaml index ca8b6ae..80e8d24 100644 --- a/.aspect/workflows/config.yaml +++ b/.aspect/workflows/config.yaml @@ -1,33 +1,13 @@ -# See https://docs.aspect.build/v/workflows/config ---- +# See https://docs.aspect.build/workflows/configuration tasks: - format: - queue: aspect-small + queue: aspect-medium - buildifier: - queue: aspect-small + queue: aspect-medium - configure: - queue: aspect-small + queue: aspect-medium - test: - bazel: - flags: - - --config=rbe - hooks: - - type: before_task - command: mkdir -p /workflows/artifacts && vmstat -a -S M -t 1 2>&1 > /workflows/artifacts/vmstat.out & - - type: after_task - command: cat /workflows/artifacts/vmstat.out - - delivery: - auto_deliver: true - rules: - - deliverable: 'attr("tags", "\bdeliverable\b", //...)' - condition: - branches: - - main - - deliverable: - - //docs:docs_delivery - condition: - only_on_change: false - branches: - - main + - finalization: + queue: aspect-small notifications: github: {} diff --git a/.github/workflows/.aspect-workflows-reusable.yaml b/.github/workflows/.aspect-workflows-reusable.yaml deleted file mode 100644 index 6641acc..0000000 --- a/.github/workflows/.aspect-workflows-reusable.yaml +++ /dev/null @@ -1,187 +0,0 @@ -# ================================================================================================== -# Aspect Workflows Reusable Workflow for GitHub Actions (v5.11.17) -# -# https://github.com/marketplace/actions/aspect-workflows?version=5.11.17 -# -# At this time, GitHub Actions does not allow referencing reusable workflows from public -# repositories in other organizations. See -# https://docs.github.com/en/actions/using-workflows/reusing-workflows#access-to-reusable-workflows -# for more info. -# -# Use the Aspect Workflows Reusable Workflow with GitHub Actions by doing one of the following: -# -# 1. Vendor this file into the `.github/workflows` folder of your repository and reference it with -# `uses:` in a workflow file such as `.github/workflows/aspect-workflows.yaml`: -# -# ``` -# name: Aspect Workflows -# -# on: -# push: -# branches: [main] -# pull_request: -# branches: [main] -# workflow_dispatch: -# -# jobs: -# aspect-workflows: -# name: Aspect Workflows -# uses: ./.github/workflows/.aspect-workflows-reusable.yaml -# ``` -# -# 2. Create a fork of https://github.com/aspect-build/workflows-action in your -# GitHub org and change the `uses` line above to reference the reusable work -# from your fork: -# -# ``` -# jobs: -# aspect-workflows: -# name: Aspect Workflows -# uses: my-github-org/workflows-action/.github/workflows/.aspect-workflows-reusable.yaml@5.11.17 -# ``` -# ================================================================================================== -name: Aspect Workflows Reusable Workflow (v5.11.17) -on: - # Makes this workflow reusable, see - # https://github.blog/2022-02-10-using-reusable-workflows-github-actions - workflow_call: - inputs: - aspect-config: - description: Path to the Aspect Workflows config.yaml file - type: string - default: .aspect/workflows/config.yaml - delivery-workflow: - description: The name of the file which contains the delivery workflow - type: string - default: aspect-workflows-delivery.yaml - queue: - description: The queue / runner pool that the setup step will run on - type: string - default: aspect-default - slack_webhook_url: - description: 'If set, then a webhook notification will be sent for failing builds on a release branch. Input should match the name of a secret. "secrets: inherit" must also be set' - type: string - inherited_secrets: - description: 'Comma separated list of secrets or regex (Oniguruma) describing secrets to be made available during the build. "secrets: inherit" must also be set. The regex is used by jq internally which uses the Oniguruma regular expression library: https://jqlang.github.io/jq/manual/' - type: string -jobs: - setup: - runs-on: [self-hosted, aspect-workflows, "${{ inputs.queue }}"] - steps: - - uses: actions/checkout@v4 - - id: rosetta-generate - run: | - ROSETTA_RESULT=$( \ - rosetta steps \ - --config ${{ inputs.aspect-config }} \ - --gha_task generate \ - --gha_json_pretty_print=false \ - ) - tee "${GITHUB_OUTPUT}" <<< "json=${ROSETTA_RESULT}" - outputs: - cfg: ${{ steps.rosetta-generate.outputs.json }} - bazel: - needs: [setup] - runs-on: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].labels }} - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.setup.outputs.cfg).matrix_config }} - env: - ASPECT_WORKFLOWS_CONFIG: ${{ inputs.aspect-config }} - steps: - - name: Workflows environment - run: ${{ fromJson(needs.setup.outputs.cfg).platform.directories.WORKFLOWS_BIN_DIR }}/configure_workflows_env - - name: Clone repo - uses: actions/checkout@v4 - - name: Agent health check - # Set RUNNER_TRACKER_ID="" to prevent GitHub Actions from killing the Bazel server started - # during health check when "Cleaning up orphan processes" in the "Complete job" step. - # See https://github.com/actions/runner/issues/598. - run: RUNNER_TRACKING_ID="" && ${{ fromJson(needs.setup.outputs.cfg).platform.directories.WORKFLOWS_BIN_DIR }}/agent_health_check - timeout-minutes: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].health_check_timeout }} - - name: Process secrets - id: process_secrets - if: inputs.inherited_secrets != '' - run: | - REQUIRED_SECRETS=$(${{ fromJson(needs.setup.outputs.cfg).platform.directories.WORKFLOWS_BIN_DIR }}/jq -R --compact-output 'gsub("\\s+";"";"g") | split(",")' <<< "${{ inputs.inherited_secrets }}") - FILTERED_SECRETS=$(${{ fromJson(needs.setup.outputs.cfg).platform.directories.WORKFLOWS_BIN_DIR }}/jq --compact-output --argjson secrets "${REQUIRED_SECRETS}" 'with_entries( select (.key | test($secrets[]) ) )' <<< '''${{ toJson(secrets) }}''' ) - echo "filtered_secrets=${FILTERED_SECRETS}" | tee ${GITHUB_OUTPUT} - - name: Prepare archive directories - run: rm -rf ${{ join(fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].artifact_paths, ' ') }} - - name: Determine changed files - uses: tj-actions/changed-files@v42 - if: endsWith(matrix.job, 'format') - with: - json: true - write_output_files: true - output_dir: ${{ fromJson(needs.setup.outputs.cfg).platform.directories.ARTIFACTS_DIR }} - - name: Checkout health - uses: aspect-build/workflows-action@5.11.17 - timeout-minutes: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].checkout_task_timeout }} - if: fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].has_checkout_task - with: - workspace: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].workspace }} - task: checkout - - name: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].name }} - uses: aspect-build/workflows-action@5.11.17 - env: ${{ inputs.inherited_secrets != '' && fromJson(steps.process_secrets.outputs.filtered_secrets) || fromJson('{}') }} - timeout-minutes: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].timeout_in_minutes }} - with: - workspace: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].workspace }} - task: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].task }} - - name: Send notification to Slack - id: slack - # oncall cares about branches that do delivery, so key this on whether we produce a delivery manifest - if: inputs.slack_webhook_url != '' && failure() && fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].generate_manifest - uses: slackapi/slack-github-action@v1.25.0 - with: - payload: | - { - "gha_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - } - env: - SLACK_WEBHOOK_URL: ${{ secrets[inputs.slack_webhook_url] }} - - name: Delivery manifest - if: fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].generate_manifest - uses: aspect-build/workflows-action@5.11.17 - timeout-minutes: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].delivery_manifest_timout }} - with: - workspace: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].workspace }} - task: delivery_manifest - args: "--data TARGETS_SOURCE=${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].task }}" - # Upload all artifacts for the workspace - - name: Upload artifacts - # The `always()` condition makes this step run even if a previous step failed. - # Setting `continue-on-error: true` on previous steps isn't ideal as the UI - # will flag them as having passed even if they failed. - if: ${{ always() }} - uses: actions/upload-artifact@v4 - with: - name: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].artifact_prefix }}${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].task }}.artifacts - path: ${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].artifact_upload_pattern }} - overwrite: true - # Codecov - - name: Codecov upload - # The `always()` condition makes this step run even if a previous step failed. - # Setting `continue-on-error: true` on previous steps isn't ideal as the UI - # will flag them as having passed even if they failed. - if: ${{ always() && fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].codecov_upload }} - # https://github.com/marketplace/actions/codecov - uses: codecov/codecov-action@v4 - with: - files: bazel-out/_coverage/_coverage_report.dat - token: ${{ secrets.CODECOV_TOKEN }} - functionalities: search # Disable searching for coverage reports. If enabled, it gets confused - # by the bazel convenience symlinks and finds the same coverage report - # under bazel-out and {workspace}/bazel-out. - - name: Trigger delivery - # This uses the following API: https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event - run: | - curl \ - -X POST \ - -H "Accept: application/vnd.github.v3+json" \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - https://api.github.com/repos/${{ github.repository }}/actions/workflows/${{ inputs.delivery-workflow }}/dispatches \ - -d "{\"ref\":\"${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].branch }}\",\"inputs\":{\"delivery_commit\":\"${GITHUB_SHA}\",\"workspace\":\"${{ fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].workspace }}\"}}" - shell: bash - if: fromJson(needs.setup.outputs.cfg).workflows_config[matrix.job].delivery diff --git a/.github/workflows/BUILD.bazel b/.github/workflows/BUILD.bazel index 717c5ae..ff496ae 100644 --- a/.github/workflows/BUILD.bazel +++ b/.github/workflows/BUILD.bazel @@ -1,5 +1,4 @@ load("@aspect_bazel_lib//lib:bazelrc_presets.bzl", "write_aspect_bazelrc_presets") -load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_file") load("@bazel_skylib//:bzl_library.bzl", "bzl_library") write_aspect_bazelrc_presets( @@ -10,12 +9,6 @@ write_aspect_bazelrc_presets( ], ) -write_source_file( - name = "aspect_workflows_reusable", - in_file = "@aspect_workflows_action//:.github/workflows/.aspect-workflows-reusable.yaml", - out_file = ".aspect-workflows-reusable.yaml", -) - bzl_library( name = "deps", srcs = ["deps.bzl"], diff --git a/.github/workflows/aspect-workflows-delivery.yaml b/.github/workflows/aspect-workflows-delivery.yaml deleted file mode 100644 index 5a9e70e..0000000 --- a/.github/workflows/aspect-workflows-delivery.yaml +++ /dev/null @@ -1,50 +0,0 @@ -name: Aspect Workflows Delivery - -on: - # Allow this to be triggered manually via the GH UI. See - # https://docs.aspect.build/workflows/delivery#break-glass-deliver-on-red - workflow_dispatch: - inputs: - delivery_commit: - description: The commit to checkout and run the delivery from. Targets listed in the delivery manifest for this commit will be delivered unless specific targets are listed in `delivery_targets`. - type: string - required: true - workspace: - description: The workspace to deliver from - type: string - required: false - default: "." - delivery_targets: - description: List of Bazel targets to deliver, delimited by spaces. For example, \`//app/a:push_release //app/b:push_release\`. If empty, targets listed in the delivery manifest for the target commit will be delivered. - type: string - required: false - -jobs: - delivery: - name: Aspect Workflows Delivery - runs-on: [self-hosted, aspect-workflows, aspect-default] - env: - ASPECT_WORKFLOWS_BIN_DIR: /etc/aspect/workflows/bin - steps: - - name: Workflows environment - run: ${ASPECT_WORKFLOWS_BIN_DIR}/configure_workflows_env - - uses: actions/checkout@v4 - with: - ref: ${{ inputs.delivery_commit }} - # Fetch all history for all tags and branches, so the --workspace_status_command can find - # any tags that it needs for `git describe`. - # See https://github.com/actions/checkout#Fetch-all-history-for-all-tags-and-branches - fetch-depth: 0 - - name: Agent health check - # Set RUNNER_TRACKER_ID="" to prevent GitHub Actions from killing the Bazel server started - # during health check when "Cleaning up orphan processes" in the "Complete job" step. - # See https://github.com/actions/runner/issues/598. - run: RUNNER_TRACKER_ID="" && ${ASPECT_WORKFLOWS_BIN_DIR}/agent_health_check - - name: Run delivery - uses: aspect-build/workflows-action@5.11.17 - with: - task: delivery - workspace: ${{ inputs.workspace }} - env: - DELIVERY_COMMIT: ${{ inputs.delivery_commit }} - DELIVERY_TARGETS: ${{ inputs.delivery_targets }} diff --git a/.github/workflows/aspect-workflows-warming.yaml b/.github/workflows/aspect-workflows-warming.yaml deleted file mode 100644 index 9a6326e..0000000 --- a/.github/workflows/aspect-workflows-warming.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: Aspect Workflows Warming - -on: - # Run the workflows on a cron schedule to periodically create an up-to-date warming archive - # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule - schedule: - - cron: "0 8 * * *" - - # Allow this to be triggered manually via the GitHub UI Actions tab - workflow_dispatch: - -jobs: - warming-archive: - name: Aspect Workflows Warming - runs-on: [self-hosted, aspect-workflows, aspect-warming] - env: - ASPECT_WORKFLOWS_BIN_DIR: /etc/aspect/workflows/bin - steps: - - name: Workflows environment - run: ${ASPECT_WORKFLOWS_BIN_DIR}/configure_workflows_env - - uses: actions/checkout@v4 - - name: Agent health check - # Set RUNNER_TRACKER_ID="" to prevent GitHub Actions from killing the Bazel server started - # during health check when "Cleaning up orphan processes" in the "Complete job" step. - # See https://github.com/actions/runner/issues/598. - run: RUNNER_TRACKER_ID="" && ${ASPECT_WORKFLOWS_BIN_DIR}/agent_health_check - - name: Create warming archive - uses: aspect-build/workflows-action@5.11.17 - with: - task: warming - - name: Archive warming tars - run: ${ASPECT_WORKFLOWS_BIN_DIR}/warming_archive diff --git a/.github/workflows/aspect-workflows.yaml b/.github/workflows/aspect-workflows.yaml deleted file mode 100644 index 558c50a..0000000 --- a/.github/workflows/aspect-workflows.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: Aspect Workflows - -on: - # Triggers the workflow on pull request events and on main - push: - branches: [main] - pull_request: - branches: [main] - - # Allow this to be triggered manually via the GitHub UI Actions tab - workflow_dispatch: - -concurrency: - # Cancel previous actions from the same PR or branch except 'main' branch. - # See https://docs.github.com/en/actions/using-jobs/using-concurrency and https://docs.github.com/en/actions/learn-github-actions/contexts for more info. - group: concurrency-group::${{ github.workflow }}::${{ github.event.pull_request.number > 0 && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}${{ github.ref_name == 'main' && format('::{0}', github.run_id) || ''}} - cancel-in-progress: ${{ github.ref_name != 'main' }} - -jobs: - aspect-workflows: - name: Aspect Workflows - uses: ./.github/workflows/.aspect-workflows-reusable.yaml - with: - queue: aspect-small diff --git a/.github/workflows/deps.bzl b/.github/workflows/deps.bzl deleted file mode 100644 index 6f461d4..0000000 --- a/.github/workflows/deps.bzl +++ /dev/null @@ -1,16 +0,0 @@ -"""Aspect Workflows bazel dependencies""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -ASPECT_WORKFLOWS_VERSION = "5.11.17" -ASPECT_WORKFLOWS_ACTION_INTEGRITY = "sha256-3RvALkcpaiCbfdPGD96P+0AVS6/PfvIXFsADKF/Gy1M=" - -def aspect_workflows_github_actions_deps(): - "Fetch deps needed for Aspect Workflows on GitHub Actions" - http_archive( - name = "aspect_workflows_action", - integrity = ASPECT_WORKFLOWS_ACTION_INTEGRITY, - strip_prefix = "workflows-action-{}".format(ASPECT_WORKFLOWS_VERSION), - url = "https://github.com/aspect-build/workflows-action/archive/refs/tags/{}.tar.gz".format(ASPECT_WORKFLOWS_VERSION), - build_file_content = """exports_files(glob([".github/workflows/.aspect-workflows-reusable.yaml"]))""", - ) diff --git a/.github/workflows/new_issue.yaml b/.github/workflows/new_issue.yaml deleted file mode 100644 index 19e4c84..0000000 --- a/.github/workflows/new_issue.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: New issue -on: - issues: - types: - - opened - - reopened -jobs: - new_issue: - runs-on: ubuntu-latest - permissions: - issues: write - steps: - # https://docs.github.com/en/actions/managing-issues-and-pull-requests/adding-labels-to-issues - - uses: actions/github-script@v6 - with: - script: | - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ["untriaged"] - }) - # https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects#adding-an-item-to-a-project - - run: | - gh api graphql -f query="mutation { addProjectV2ItemById(input: {projectId: \"$PROJECT_ID\" contentId: \"$CONTENT_ID\"}) { item { id } } }" - env: - GITHUB_TOKEN: ${{ secrets.GH_PROJECTS_RW_TOKEN }} - OWNER: ${{ github.repository_owner }} - REPO: ${{ github.event.repository.name }} - CONTENT_ID: ${{ github.event.issue.node_id }} - PROJECT_ID: PVT_kwDOA6IKMs4ALj2o # Aspect OSS Bazel Rules diff --git a/BUILD.bazel b/BUILD.bazel index 4a5087d..bb5e4c8 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,20 +1,8 @@ -load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary") -load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load("@buildifier_prebuilt//:rules.bzl", "buildifier") load("@npm//:defs.bzl", "npm_link_all_packages") npm_link_all_packages(name = "node_modules") -gazelle_binary( - name = "gazelle_bin", - languages = ["@bazel_skylib_gazelle_plugin//bzl"], -) - -gazelle( - name = "gazelle", - gazelle = "gazelle_bin", -) - buildifier( name = "buildifier", exclude_patterns = ["./.git/*"], @@ -35,13 +23,3 @@ alias( name = "format", actual = "//tools:format", ) - -bzl_library( - name = "internal_deps", - srcs = ["internal_deps.bzl"], - visibility = ["//visibility:public"], - deps = [ - "@bazel_tools//tools/build_defs/repo:http.bzl", - "@bazel_tools//tools/build_defs/repo:utils.bzl", - ], -) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f235597..7a4b2d3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,12 +13,6 @@ pre-commit install Otherwise later tooling on CI may yell at you about formatting/linting violations. -## Updating BUILD files - -Some targets are generated from sources. -Currently this is just the `bzl_library` targets. -Run `bazel run //:gazelle` to keep them up-to-date. - ## Using this as a development dependency of other rules You'll commonly find that you develop in another WORKSPACE, such as diff --git a/MODULE.bazel b/MODULE.bazel index 3cef800..c6c6a89 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -15,7 +15,5 @@ bazel_dep(name = "rules_nodejs", version = "6.2.0") ####### Dev dependencies ######## bazel_dep(name = "aspect_rules_lint", version = "0.11.0", dev_dependency = True) -bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.5.0", dev_dependency = True) bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True) -bazel_dep(name = "gazelle", version = "0.36.0", dev_dependency = True, repo_name = "bazel_gazelle") bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc") diff --git a/WORKSPACE b/WORKSPACE index 58668c1..a6c1484 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -54,17 +54,6 @@ load("@stardoc_maven//:defs.bzl", stardoc_pinned_maven_install = "pinned_maven_i stardoc_pinned_maven_install() -############################################ -# Gazelle, for generating bzl_library targets -load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") -load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") - -go_rules_dependencies() - -go_register_toolchains(version = "1.21.6") - -gazelle_dependencies() - # Buildifier load("@buildifier_prebuilt//:deps.bzl", "buildifier_prebuilt_deps") diff --git a/bazel/platforms/BUILD.bazel b/bazel/platforms/BUILD.bazel new file mode 100644 index 0000000..df58fbd --- /dev/null +++ b/bazel/platforms/BUILD.bazel @@ -0,0 +1,12 @@ +platform( + name = "x86_64_linux_remote", + constraint_values = [ + "@platforms//os:linux", + "@platforms//cpu:x86_64", + ], + exec_properties = { + "OSFamily": "Linux", + "container-image": "docker://ghcr.io/catthehacker/ubuntu:act-22.04@sha256:5f9c35c25db1d51a8ddaae5c0ba8d3c163c5e9a4a6cc97acd409ac7eae239448", + }, + visibility = ["//visibility:public"], +) diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel index e9e0b81..d32f1ab 100644 --- a/docs/BUILD.bazel +++ b/docs/BUILD.bazel @@ -17,20 +17,3 @@ update_docs( # "Stardoc documentation generation failed: File /home/runner/.cache/bazel/_bazel_runner/49ae4abee64f46f5e03b51e3020410d1/sandbox/linux-sandbox/168/execroot/_main/bazel-out/k8-opt-exec-2B5CBBC6/bin/docs/jasmine_test_stardoc.runfiles/_main/jasmine/private/jasmine_test.bzl imported '@aspect_rules_js//js:libs.bzl', yet /home/runner/.cache/bazel/_bazel_runner/49ae4abee64f46f5e03b51e3020410d1/sandbox/linux-sandbox/168/execroot/_main/bazel-out/k8-opt-exec-2B5CBBC6/bin/docs/jasmine_test_stardoc.runfiles/aspect_rules_js/js/libs.bzl was not found." tags = ["skip-on-bazel6"], ) - -# Demonstration delivery target for Aspect Workflows. -# In the future this could be wired up to push to a demonstration S3 bucket. -sh_binary( - name = "docs_delivery_only_on_change", - srcs = ["delivery.sh"], - data = glob(["*.md"]), - tags = ["deliverable"], -) - -# Demonstration delivery target for Aspect Workflows. -# In the future this could be wired up to push to a demonstration S3 bucket. -sh_binary( - name = "docs_delivery", - srcs = ["delivery.sh"], - data = glob(["*.md"]), -) diff --git a/docs/delivery.sh b/docs/delivery.sh deleted file mode 100755 index b88f661..0000000 --- a/docs/delivery.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -o nounset -o pipefail - -echo "Demostration delivery target" diff --git a/internal_deps.bzl b/internal_deps.bzl index 89ff662..7cee451 100644 --- a/internal_deps.bzl +++ b/internal_deps.bzl @@ -4,31 +4,11 @@ Users should *not* need to install these. If users see a load() statement from these, that's a bug in our distribution. """ -load("//.github/workflows:deps.bzl", "aspect_workflows_github_actions_deps") - # buildifier: disable=bzl-visibility load("//jasmine/private:maybe.bzl", http_archive = "maybe_http_archive") def rules_jasmine_internal_deps(): "Fetch deps needed for local development" - http_archive( - name = "io_bazel_rules_go", - sha256 = "80a98277ad1311dacd837f9b16db62887702e9f1d1c4c9f796d0121a46c8e184", - urls = ["https://github.com/bazelbuild/rules_go/releases/download/v0.46.0/rules_go-v0.46.0.zip"], - ) - - http_archive( - name = "bazel_gazelle", - integrity = "sha256-dd8ojEsxyB61D1Hi4U9HY8t1SNquEmgXJHBkY3/Z6mI=", - urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.36.0/bazel-gazelle-v0.36.0.tar.gz"], - ) - - http_archive( - name = "bazel_skylib_gazelle_plugin", - sha256 = "747addf3f508186234f6232674dd7786743efb8c68619aece5fb0cac97b8f415", - urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-gazelle-plugin-1.5.0.tar.gz"], - ) - http_archive( name = "io_bazel_stardoc", sha256 = "62bd2e60216b7a6fec3ac79341aa201e0956477e7c8f6ccc286f279ad1d96432", @@ -48,5 +28,3 @@ def rules_jasmine_internal_deps(): strip_prefix = "rules_lint-0.11.0", url = "https://github.com/aspect-build/rules_lint/releases/download/v0.11.0/rules_lint-v0.11.0.tar.gz", ) - - aspect_workflows_github_actions_deps() diff --git a/jasmine/private/BUILD.bazel b/jasmine/private/BUILD.bazel index 7ecade8..7c5f9eb 100644 --- a/jasmine/private/BUILD.bazel +++ b/jasmine/private/BUILD.bazel @@ -5,8 +5,6 @@ exports_files([ "junit_reporter.cjs", ]) -# gazelle:exclude v*.*.*/* - bzl_library( name = "jasmine_test", # keep