Skip to content

Commit

Permalink
chore: Fix job name for CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeMathWalker committed Nov 11, 2024
1 parent 81e3417 commit b493d53
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 31 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ on:
- main

jobs:

build_clis_linux:
name: "Build CLIs (linux)"
runs-on: ubuntu-latest

permissions:
pull-requests: write
checks: write
Expand Down Expand Up @@ -50,7 +51,7 @@ jobs:
if: ${{ github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Build CLIs (<<- target >>)
job: Build CLIs (linux)
workflow: "Build and store docs artifacts"
run_id: ${{ github.run_id }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -76,15 +77,16 @@ jobs:
if: ${{ always() && github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Build CLIs (<<- target >>)
job: Build CLIs (linux)
conclusion: ${{ job.status }}
github_token: ${{ secrets.GITHUB_TOKEN }}

tests_linux:
name: "Run tests (linux)"
runs-on: ubuntu-latest
needs:
- build_clis_linux

permissions:
pull-requests: write
checks: write
Expand Down Expand Up @@ -117,7 +119,7 @@ jobs:
if: ${{ github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Run tests (<< target >>)
job: Run tests (linux)
workflow: "Build and store docs artifacts"
run_id: ${{ github.run_id }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -166,13 +168,14 @@ jobs:
if: ${{ always() && github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Run tests (<< target >>)
job: Run tests (linux)
conclusion: ${{ job.status }}
github_token: ${{ secrets.GITHUB_TOKEN }}

build_clis_macos:
name: "Build CLIs (macos)"
runs-on: macos-14

permissions:
pull-requests: write
checks: write
Expand Down Expand Up @@ -205,7 +208,7 @@ jobs:
if: ${{ github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Build CLIs (<<- target >>)
job: Build CLIs (macos)
workflow: "Build and store docs artifacts"
run_id: ${{ github.run_id }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -231,15 +234,16 @@ jobs:
if: ${{ always() && github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Build CLIs (<<- target >>)
job: Build CLIs (macos)
conclusion: ${{ job.status }}
github_token: ${{ secrets.GITHUB_TOKEN }}

tests_macos:
name: "Run tests (macos)"
runs-on: macos-14
needs:
- build_clis_macos

permissions:
pull-requests: write
checks: write
Expand Down Expand Up @@ -272,7 +276,7 @@ jobs:
if: ${{ github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Run tests (<< target >>)
job: Run tests (macos)
workflow: "Build and store docs artifacts"
run_id: ${{ github.run_id }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -321,13 +325,14 @@ jobs:
if: ${{ always() && github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Run tests (<< target >>)
job: Run tests (macos)
conclusion: ${{ job.status }}
github_token: ${{ secrets.GITHUB_TOKEN }}

build_clis_windows:
name: "Build CLIs (windows)"
runs-on: windows-2022

permissions:
pull-requests: write
checks: write
Expand Down Expand Up @@ -360,7 +365,7 @@ jobs:
if: ${{ github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Build CLIs (<<- target >>)
job: Build CLIs (windows)
workflow: "Build and store docs artifacts"
run_id: ${{ github.run_id }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -386,15 +391,16 @@ jobs:
if: ${{ always() && github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Build CLIs (<<- target >>)
job: Build CLIs (windows)
conclusion: ${{ job.status }}
github_token: ${{ secrets.GITHUB_TOKEN }}

tests_windows:
name: "Run tests (windows)"
runs-on: windows-2022
needs:
- build_clis_windows

permissions:
pull-requests: write
checks: write
Expand Down Expand Up @@ -427,7 +433,7 @@ jobs:
if: ${{ github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Run tests (<< target >>)
job: Run tests (windows)
workflow: "Build and store docs artifacts"
run_id: ${{ github.run_id }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -470,7 +476,7 @@ jobs:
if: ${{ always() && github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Run tests (<< target >>)
job: Run tests (windows)
conclusion: ${{ job.status }}
github_token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
24 changes: 11 additions & 13 deletions ci_utils/templates/ci.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,32 @@ on:

jobs:
<%- for (os, target, binary_extension) in [
('ubuntu-latest', 'linux', ''),
('macos-14', 'macos', ''),
('ubuntu-latest', 'linux', ''),
('macos-14', 'macos', ''),
('windows-2022', 'windows', '.exe')
] %>

build_clis_<<- target >>:
name: "Build CLIs (<<- target >>)"
runs-on: << os >>
<%- with job_name = "Build CLIs (<<- target >>)" -%>
<%- from 'build_clis_steps' import output -%>
<% set job_name %>Build CLIs (<<- target >>)<% endset %>
<%- from 'build_clis_steps' import output -%>
<<- output | indent(4) >>
<%- endwith %>


tests_<<- target >>:
name: "Run tests (<<- target >>)"
runs-on: << os >>
needs:
- build_clis_<<- target >>
<%- with job_name = 'Run tests (<< target >>)' -%>
<%- from 'tests_steps' import output -%>
<% set job_name %>Run tests (<<- target >>)<% endset %>
<%- from 'tests_steps' import output -%>
<<- output | indent(4) >>
<%- endwith %>
<%- endfor %>

build_tutorial_generator:
runs-on: ubuntu-latest
<%- with job_name = 'Build tutorial generator' -%>
<%- from 'build_tutorial_generator_steps' import output -%>
<%- from 'build_tutorial_generator_steps' import output -%>
<<- output | indent(4) ->>
<%- endwith %>

Expand All @@ -54,13 +52,13 @@ jobs:
- build_clis_linux
- build_tutorial_generator
<%- with job_name = 'Check if up to date' -%>
<%- from 'is_up_to_date_steps' import output -%>
<%- from 'is_up_to_date_steps' import output -%>
<<- output | indent(4) >>
<%- endwith %>

build_docs:
runs-on: ubuntu-latest
<%- with job_name = 'Build docs' %>
<%- from 'build_docs_steps' import output %>
<%- from 'build_docs_steps' import output %>
<<- output | indent(4) >>
<%- endwith %>

0 comments on commit b493d53

Please sign in to comment.