Skip to content

Commit

Permalink
Minor bugfix to CI actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tellicious committed Nov 1, 2024
1 parent 28067cd commit ccba088
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/createRelease.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Create release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Create release

jobs:
release:
name: Create release
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/formatCode.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
name: Format code

on:
pull_request:
types: [opened, reopened]
types: [opened, reopened, edited]
workflow_dispatch:
push:
branches:
- main

name: Format code
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
formatCode:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Install clang-format 18
run: |
Expand All @@ -19,6 +26,9 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH_NAME }}
fetch-depth: 0

- name: Format code and commit changes
run : |
Expand All @@ -34,6 +44,6 @@ jobs:
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
branch: ${{ env.BRANCH_NAME }}


13 changes: 10 additions & 3 deletions .github/workflows/runTests.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Unit tests

on:
pull_request:
types: [opened, reopened]
types: [opened, reopened, edited]
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
workflow_dispatch:

name: Unit tests
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
unitTests:
runs-on: ubuntu-latest
Expand All @@ -22,14 +26,17 @@ jobs:
if: ${{ github.event_name == 'pull_request' }}
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
ref: ${{ env.BRANCH_NAME }}
check-name: 'formatCode'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
allowed-conclusions: success

- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH_NAME }}
fetch-depth: 0

- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -S ${{github.workspace}} -B ${{github.workspace}}/build -G Ninja
Expand Down

0 comments on commit ccba088

Please sign in to comment.