Separate clang-format test into its own workflow (#283)
* Rework workflow dependencies
This commit is contained in:
@@ -21,14 +21,17 @@ on:
|
|||||||
default: true
|
default: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-tests-job:
|
clang-format-job:
|
||||||
name: Run tests
|
name: Run clang-format test
|
||||||
uses: ./.github/workflows/run_tests_ci_workflow.yml
|
uses: ./.github/workflows/clang_format_ci_workflow.yml
|
||||||
|
|
||||||
|
unit-tests-job:
|
||||||
|
name: Run unit tests
|
||||||
|
uses: ./.github/workflows/unit_tests_ci_workflow.yml
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build ROM
|
name: Build ROM
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: run-tests-job
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
|||||||
+4
-9
@@ -1,12 +1,12 @@
|
|||||||
name: Run Tests
|
name: Run Clang Format Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run_tests:
|
run-test:
|
||||||
name: Run Tests
|
name: Verify code formatting
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Install clang-format
|
- name: Install clang-format
|
||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Clang Format
|
- name: Run clang-format
|
||||||
run: >
|
run: >
|
||||||
clang-format --dry-run -Werror
|
clang-format --dry-run -Werror
|
||||||
include/bitset.h source/bitset.c
|
include/bitset.h source/bitset.c
|
||||||
@@ -31,8 +31,3 @@ jobs:
|
|||||||
# Currently contains only the code that has been formatted to conform
|
# Currently contains only the code that has been formatted to conform
|
||||||
# When all existing code conforms, change to this:
|
# When all existing code conforms, change to this:
|
||||||
# run: clang-format --dry-run -Werror include/*.h source/*.c
|
# run: clang-format --dry-run -Werror include/*.h source/*.c
|
||||||
|
|
||||||
- name: Run Tests
|
|
||||||
run: cd tests && ./run_tests.sh
|
|
||||||
|
|
||||||
|
|
||||||
@@ -17,10 +17,10 @@ jobs:
|
|||||||
|
|
||||||
nightly:
|
nightly:
|
||||||
name: Deploy nightly
|
name: Deploy nightly
|
||||||
|
needs: build-job
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build-job
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download the build output
|
- name: Download the build output
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v5
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
name: Run Unit Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run-unit-tests:
|
||||||
|
name: Run Unit Tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Run Unit Tests
|
||||||
|
run: cd tests && ./run_tests.sh
|
||||||
Reference in New Issue
Block a user