Skip to content

Commit

Permalink
Different labels for stdlib API checks (#12326)
Browse files Browse the repository at this point in the history
* Extract label changed jobs into a separate workflow

* [WIP] Modify Standard.Base API

* Rename jobs

* Not stdlib file changed checking in engine-changed-files.yml

* stdlib API check workflow is generated

* Fix escaping brackets in run step

* ALL_CHANGED_FILES is not escaped

* Generate jobs for the rest of Standard libs

* Revert "[WIP] Modify Standard.Base API"

This reverts commit ccbf82f.

* [WIP] Add API signature of Standard.AWS

* Revert "[WIP] Add API signature of Standard.AWS"

This reverts commit 231f04b.

* Reintroduce StandardLibraryApiCheck
  • Loading branch information
Akirathan authored Feb 21, 2025
1 parent de55ce9 commit a1c2924
Show file tree
Hide file tree
Showing 7 changed files with 442 additions and 45 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/engine-changed-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ on:
any_changed:
description: "Returns `true` when any of the filenames have changed"
value: ${{ jobs.engine-changed-files.outputs.any_changed }}
stdlib_api_any_changed:
description: "Returns `true` when any of the Standard library API filenames have changed"
value: ${{ jobs.stdlib-api-changed-files.outputs.any_changed }}

jobs:
engine-changed-files:
Expand Down Expand Up @@ -56,29 +53,3 @@ jobs:
for file in ${ALL_CHANGED_FILES}; do
echo "$file"
done
stdlib-api-changed-files:
runs-on: ubuntu-latest
name: Changed Standard libs API docs files
outputs:
all_changed_files: ${{ steps.stdlib-api-changed-files.outputs.all_changed_files }}
any_changed: ${{ steps.stdlib-api-changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
id: stdlib-api-changed-files
uses: tj-actions/changed-files@v45
with:
files: |
distribution/lib/Standard/**/docs/api/**.md
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.stdlib-api-changed-files.outputs.all_changed_files }}
run: |
if [[ "${{ steps.stdlib-api-changed-files.outputs.any_changed }}" == "true" ]]; then
echo "API docs files changed:"
fi
for file in ${ALL_CHANGED_FILES}; do
echo "$file"
done
13 changes: 3 additions & 10 deletions .github/workflows/engine-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,9 @@ jobs:
secrets: inherit

stdlib-api-changes-label:
name: 🏷 Append Standard library API change label
runs-on: ubuntu-latest
needs: [engine-changed-files]
if: needs.engine-changed-files.outputs.stdlib_api_any_changed == 'true'
steps:
- name: Add label to the PR
uses: actions-ecosystem/action-add-labels@v1
with:
labels: "-libs-API-change"
github_token: ${{ secrets.GITHUB_TOKEN }}
name: 🏷 Append labels to PR
uses: ./.github/workflows/std-libs-labels.yml
secrets: inherit

required-checks:
name: Engine Required Checks
Expand Down
293 changes: 293 additions & 0 deletions .github/workflows/std-libs-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,293 @@
# This file is auto-generated. Do not edit it manually!
# Edit the enso_build::ci_gen module instead and run `cargo run --package enso-build-ci-gen`.

name: 🏷 Standard Library Labels
description: Check if the API signature files in any of the standard libraries changed and if so, append a corresponding label to the PR.
on:
push:
branches:
- develop
pull_request: {}
workflow_dispatch: {}
workflow_call: {}
permissions:
checks: write
pull-requests: write
jobs:
stdlib-api-check-AWS-linux-amd64:
name: AWS-change-labels
runs-on:
- ubuntu-latest
steps:
- name: Checking out the repository
uses: actions/checkout@v4
with:
clean: false
fetch-depth: 2
- id: AWS-changed-files
name: AWS-changed-files
uses: tj-actions/changed-files@v45
with:
files: distribution/lib/Standard/AWS/**/docs/api/**.md
- name: List all changed files in AWS
run: "\n if [[ \"${{ steps.AWS-changed-files.outputs.any_changed }}\" == \"true\" ]]; then\n echo \"Files changed:\"\n fi\n for file in ${ALL_CHANGED_FILES}; do\n echo \"$file\"\n done\n "
env:
ALL_CHANGED_FILES: ${{ steps.AWS-changed-files.outputs.all_changed_files }}
- if: steps.AWS-changed-files.outputs.any_changed == 'true'
name: Append -libs-API-change-AWS label
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: -libs-API-change-AWS
stdlib-api-check-Base-linux-amd64:
name: Base-change-labels
runs-on:
- ubuntu-latest
steps:
- name: Checking out the repository
uses: actions/checkout@v4
with:
clean: false
fetch-depth: 2
- id: Base-changed-files
name: Base-changed-files
uses: tj-actions/changed-files@v45
with:
files: distribution/lib/Standard/Base/**/docs/api/**.md
- name: List all changed files in Base
run: "\n if [[ \"${{ steps.Base-changed-files.outputs.any_changed }}\" == \"true\" ]]; then\n echo \"Files changed:\"\n fi\n for file in ${ALL_CHANGED_FILES}; do\n echo \"$file\"\n done\n "
env:
ALL_CHANGED_FILES: ${{ steps.Base-changed-files.outputs.all_changed_files }}
- if: steps.Base-changed-files.outputs.any_changed == 'true'
name: Append -libs-API-change-Base label
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: -libs-API-change-Base
stdlib-api-check-Database-linux-amd64:
name: Database-change-labels
runs-on:
- ubuntu-latest
steps:
- name: Checking out the repository
uses: actions/checkout@v4
with:
clean: false
fetch-depth: 2
- id: Database-changed-files
name: Database-changed-files
uses: tj-actions/changed-files@v45
with:
files: distribution/lib/Standard/Database/**/docs/api/**.md
- name: List all changed files in Database
run: "\n if [[ \"${{ steps.Database-changed-files.outputs.any_changed }}\" == \"true\" ]]; then\n echo \"Files changed:\"\n fi\n for file in ${ALL_CHANGED_FILES}; do\n echo \"$file\"\n done\n "
env:
ALL_CHANGED_FILES: ${{ steps.Database-changed-files.outputs.all_changed_files }}
- if: steps.Database-changed-files.outputs.any_changed == 'true'
name: Append -libs-API-change-Database label
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: -libs-API-change-Database
stdlib-api-check-Google_Api-linux-amd64:
name: Google_Api-change-labels
runs-on:
- ubuntu-latest
steps:
- name: Checking out the repository
uses: actions/checkout@v4
with:
clean: false
fetch-depth: 2
- id: Google_Api-changed-files
name: Google_Api-changed-files
uses: tj-actions/changed-files@v45
with:
files: distribution/lib/Standard/Google_Api/**/docs/api/**.md
- name: List all changed files in Google_Api
run: "\n if [[ \"${{ steps.Google_Api-changed-files.outputs.any_changed }}\" == \"true\" ]]; then\n echo \"Files changed:\"\n fi\n for file in ${ALL_CHANGED_FILES}; do\n echo \"$file\"\n done\n "
env:
ALL_CHANGED_FILES: ${{ steps.Google_Api-changed-files.outputs.all_changed_files }}
- if: steps.Google_Api-changed-files.outputs.any_changed == 'true'
name: Append -libs-API-change-Google_Api label
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: -libs-API-change-Google_Api
stdlib-api-check-Image-linux-amd64:
name: Image-change-labels
runs-on:
- ubuntu-latest
steps:
- name: Checking out the repository
uses: actions/checkout@v4
with:
clean: false
fetch-depth: 2
- id: Image-changed-files
name: Image-changed-files
uses: tj-actions/changed-files@v45
with:
files: distribution/lib/Standard/Image/**/docs/api/**.md
- name: List all changed files in Image
run: "\n if [[ \"${{ steps.Image-changed-files.outputs.any_changed }}\" == \"true\" ]]; then\n echo \"Files changed:\"\n fi\n for file in ${ALL_CHANGED_FILES}; do\n echo \"$file\"\n done\n "
env:
ALL_CHANGED_FILES: ${{ steps.Image-changed-files.outputs.all_changed_files }}
- if: steps.Image-changed-files.outputs.any_changed == 'true'
name: Append -libs-API-change-Image label
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: -libs-API-change-Image
stdlib-api-check-Microsoft-linux-amd64:
name: Microsoft-change-labels
runs-on:
- ubuntu-latest
steps:
- name: Checking out the repository
uses: actions/checkout@v4
with:
clean: false
fetch-depth: 2
- id: Microsoft-changed-files
name: Microsoft-changed-files
uses: tj-actions/changed-files@v45
with:
files: distribution/lib/Standard/Microsoft/**/docs/api/**.md
- name: List all changed files in Microsoft
run: "\n if [[ \"${{ steps.Microsoft-changed-files.outputs.any_changed }}\" == \"true\" ]]; then\n echo \"Files changed:\"\n fi\n for file in ${ALL_CHANGED_FILES}; do\n echo \"$file\"\n done\n "
env:
ALL_CHANGED_FILES: ${{ steps.Microsoft-changed-files.outputs.all_changed_files }}
- if: steps.Microsoft-changed-files.outputs.any_changed == 'true'
name: Append -libs-API-change-Microsoft label
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: -libs-API-change-Microsoft
stdlib-api-check-Snowflake-linux-amd64:
name: Snowflake-change-labels
runs-on:
- ubuntu-latest
steps:
- name: Checking out the repository
uses: actions/checkout@v4
with:
clean: false
fetch-depth: 2
- id: Snowflake-changed-files
name: Snowflake-changed-files
uses: tj-actions/changed-files@v45
with:
files: distribution/lib/Standard/Snowflake/**/docs/api/**.md
- name: List all changed files in Snowflake
run: "\n if [[ \"${{ steps.Snowflake-changed-files.outputs.any_changed }}\" == \"true\" ]]; then\n echo \"Files changed:\"\n fi\n for file in ${ALL_CHANGED_FILES}; do\n echo \"$file\"\n done\n "
env:
ALL_CHANGED_FILES: ${{ steps.Snowflake-changed-files.outputs.all_changed_files }}
- if: steps.Snowflake-changed-files.outputs.any_changed == 'true'
name: Append -libs-API-change-Snowflake label
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: -libs-API-change-Snowflake
stdlib-api-check-Table-linux-amd64:
name: Table-change-labels
runs-on:
- ubuntu-latest
steps:
- name: Checking out the repository
uses: actions/checkout@v4
with:
clean: false
fetch-depth: 2
- id: Table-changed-files
name: Table-changed-files
uses: tj-actions/changed-files@v45
with:
files: distribution/lib/Standard/Table/**/docs/api/**.md
- name: List all changed files in Table
run: "\n if [[ \"${{ steps.Table-changed-files.outputs.any_changed }}\" == \"true\" ]]; then\n echo \"Files changed:\"\n fi\n for file in ${ALL_CHANGED_FILES}; do\n echo \"$file\"\n done\n "
env:
ALL_CHANGED_FILES: ${{ steps.Table-changed-files.outputs.all_changed_files }}
- if: steps.Table-changed-files.outputs.any_changed == 'true'
name: Append -libs-API-change-Table label
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: -libs-API-change-Table
stdlib-api-check-Tableau-linux-amd64:
name: Tableau-change-labels
runs-on:
- ubuntu-latest
steps:
- name: Checking out the repository
uses: actions/checkout@v4
with:
clean: false
fetch-depth: 2
- id: Tableau-changed-files
name: Tableau-changed-files
uses: tj-actions/changed-files@v45
with:
files: distribution/lib/Standard/Tableau/**/docs/api/**.md
- name: List all changed files in Tableau
run: "\n if [[ \"${{ steps.Tableau-changed-files.outputs.any_changed }}\" == \"true\" ]]; then\n echo \"Files changed:\"\n fi\n for file in ${ALL_CHANGED_FILES}; do\n echo \"$file\"\n done\n "
env:
ALL_CHANGED_FILES: ${{ steps.Tableau-changed-files.outputs.all_changed_files }}
- if: steps.Tableau-changed-files.outputs.any_changed == 'true'
name: Append -libs-API-change-Tableau label
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: -libs-API-change-Tableau
stdlib-api-check-Test-linux-amd64:
name: Test-change-labels
runs-on:
- ubuntu-latest
steps:
- name: Checking out the repository
uses: actions/checkout@v4
with:
clean: false
fetch-depth: 2
- id: Test-changed-files
name: Test-changed-files
uses: tj-actions/changed-files@v45
with:
files: distribution/lib/Standard/Test/**/docs/api/**.md
- name: List all changed files in Test
run: "\n if [[ \"${{ steps.Test-changed-files.outputs.any_changed }}\" == \"true\" ]]; then\n echo \"Files changed:\"\n fi\n for file in ${ALL_CHANGED_FILES}; do\n echo \"$file\"\n done\n "
env:
ALL_CHANGED_FILES: ${{ steps.Test-changed-files.outputs.all_changed_files }}
- if: steps.Test-changed-files.outputs.any_changed == 'true'
name: Append -libs-API-change-Test label
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: -libs-API-change-Test
stdlib-api-check-Visualization-linux-amd64:
name: Visualization-change-labels
runs-on:
- ubuntu-latest
steps:
- name: Checking out the repository
uses: actions/checkout@v4
with:
clean: false
fetch-depth: 2
- id: Visualization-changed-files
name: Visualization-changed-files
uses: tj-actions/changed-files@v45
with:
files: distribution/lib/Standard/Visualization/**/docs/api/**.md
- name: List all changed files in Visualization
run: "\n if [[ \"${{ steps.Visualization-changed-files.outputs.any_changed }}\" == \"true\" ]]; then\n echo \"Files changed:\"\n fi\n for file in ${ALL_CHANGED_FILES}; do\n echo \"$file\"\n done\n "
env:
ALL_CHANGED_FILES: ${{ steps.Visualization-changed-files.outputs.all_changed_files }}
- if: steps.Visualization-changed-files.outputs.any_changed == 'true'
name: Append -libs-API-change-Visualization label
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: -libs-API-change-Visualization
env:
ENSO_BUILD_SKIP_VERSION_CHECK: "true"
1 change: 1 addition & 0 deletions build_tools/build/paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
promote.yml:
release.yml:
std-libs-benchmark.yml:
std-libs-labels.yml:
wasm-checks.yml:
app/:
gui/: # GUI.
Expand Down
Loading

0 comments on commit a1c2924

Please sign in to comment.