Skip to content

Commit

Permalink
🔨 Rename workflows to follow nomenclature
Browse files Browse the repository at this point in the history
The various workflows were all over the place in terms of naming.
This tries to start a new nomenclature for `scheduled-` and `deploy-`
prefixes for scheduled CI runs and deployments respectively, and to use
`community-` for any community-driven workflows such as bots.

Basic CI will now be just `ci`, and other workflows lack a distinct
name (for now).

In the process, some redundant or unused trigger settings have been
dropped.
  • Loading branch information
bitwizeshift committed Dec 26, 2023
1 parent bd6d150 commit 7f53a48
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 60 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and Test
on:
workflow_call:

jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
# - windows-latest
defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Prepare runner
uses: ./.github/actions/prepare-runner

- name: Install toolchain
uses: ./.github/actions/rust-toolchain
with:
components: llvm-tools-preview

- name: Build
id: build
uses: ./.github/actions/cargo-build

- name: Test
id: test
run: |
ls -la $VULKAN_SDK/lib
cargo test --verbose
- name: Doctest
if: contains(fromJSON('["success", "failure"]'), steps.test.conclusion)
run: |
ls -la $VULKAN_SDK/lib
cargo test --doc --verbose
- name: Coverage
uses: ./.github/actions/cargo-code-coverage
with:
output-file: ${{ matrix.os }}-codecov.json
minimum-requirement: 0.0
7 changes: 3 additions & 4 deletions .github/workflows/bundle.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Bundle Binaries
on:
workflow_run:
workflows: [ build ]
types:
- completed
push:
branches:
- master
workflow_dispatch:
inputs:
profile:
Expand Down
47 changes: 2 additions & 45 deletions .github/workflows/build.yaml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Continuous Integration
on:
push:
branches: [master, feature/*]
Expand Down Expand Up @@ -156,47 +156,4 @@ jobs:

build:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
# - windows-latest
defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Prepare runner
uses: ./.github/actions/prepare-runner

- name: Install toolchain
uses: ./.github/actions/rust-toolchain
with:
components: llvm-tools-preview

- name: Build
id: build
uses: ./.github/actions/cargo-build

- name: Test
id: test
run: |
ls -la $VULKAN_SDK/lib
cargo test --verbose
- name: Doctest
if: contains(fromJSON('["success", "failure"]'), steps.test.conclusion)
run: |
ls -la $VULKAN_SDK/lib
cargo test --doc --verbose
- name: Coverage
uses: ./.github/actions/cargo-code-coverage
with:
output-file: ${{ matrix.os }}-codecov.json
minimum-requirement: 0.0
uses: ./.github/workflows/build-and-test.yaml
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ concurrency:
jobs:
verify-build:
name: Verify build integrity
uses: ./.github/workflows/build.yaml
uses: ./.github/workflows/ci.yaml
permissions:
contents: read
security-events: write
actions: read

verify-docs:
name: Verify documentation
uses: ./.github/workflows/docs.yaml
uses: ./.github/workflows/deploy-github-pages.yaml
permissions:
contents: read
pages: write
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Audit
name: Weekly Audit
on:
schedule: [cron: "0 0 * * 0"]
workflow_call:
schedule:
# Scheduled to run once per week
- cron: '0 0 * * 0'

jobs:
audit:
Expand Down Expand Up @@ -40,10 +41,10 @@ jobs:
id: variables
run: echo "date=$(date +%F)" >> "${GITHUB_OUTPUT}"

- name: Create issue if none exist
- name: Create issue or comment
uses: ./.github/actions/github-issue-or-comment
with:
title: Cargo audit failed
title: ${{ github.workflow }} failed
body: |
⚠️ The Audit workflow run on ${{ steps.variables.outputs.date }} failed!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: Nightly Build
on:
schedule:
# Scheduled to run at the same time every day
- cron: '0 0 * * *'

jobs:
nightly-ci:
name: Nightly Integration
name: Build and Test
permissions:
contents: read
security-events: write
actions: read
uses: ./.github/workflows/build.yaml
uses: ./.github/workflows/build-and-test.yaml

create-issue:
name: Create Github Issue
Expand All @@ -28,10 +29,10 @@ jobs:
id: variables
run: echo "date=$(date +%F)" >> "${GITHUB_OUTPUT}"

- name: Create issue if none exist
- name: Create issue or comment
uses: ./.github/actions/github-issue-or-comment
with:
title: Nightly CI failed
title: ${{ github.workflow }} failed
body: |
⚠️ The nightly CI workflow run on ${{ steps.variables.outputs.date }} failed!
Expand Down

0 comments on commit 7f53a48

Please sign in to comment.