Skip to content

Commit

Permalink
chore: fix maintenance.yml, formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirdEyeSqueegee committed Sep 8, 2023
1 parent 6e6dbba commit 01e2984
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint_pr_title.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/main_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Main CI

on:
pull_request:
branches: [ main, feature/* ]
branches: [main, feature/*]
workflow_dispatch:

env:
Expand Down Expand Up @@ -32,10 +32,10 @@ jobs:
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.26'
cmake-version: "3.26"

- name: Generate
run: cmake -B "${{ github.workspace }}/build" -S "${{ github.workspace }}/CommonLibSF" --preset=build-release-${{ matrix.compiler }}

- name: Build
run: cmake --build "${{ github.workspace }}/build" --config release
run: cmake --build "${{ github.workspace }}/build" --config release
75 changes: 38 additions & 37 deletions .github/workflows/maintenance.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
name: "Maintainance"

on:
workflow_run:
workflows: ["Main CI"]
types:
- completed
on:
push:
branches: [main]
paths:
- ".github/workflows/main_ci.yml"
- "CommonLibSF/**"

jobs:
maintainance:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}

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

- name: Update Starfield.h
shell: pwsh
run: "& ${{ github.workspace }}/.github/make-directives.ps1 ${{ github.workspace }}/CommonLibSF"

- name: Enforce style formatting
uses: DoozyX/[email protected]
with:
source: '.'
exclude: './docs'
extensions: 'c,cc,cpp,cppm,cxx,h,hpp,hxx,inl,inc,ixx,mxx'
clangFormatVersion: 16
inplace: True
- name: Update vcpkg version-date
id: versioning
shell: pwsh
run: "& ${{ github.workspace }}/.github/update-registry.ps1 ${{ github.workspace }}"
- name: Check for success
run: exit 1
if: ${{ steps.versioning.outputs.VCPKG_SUCCESS == 'false' }}

- name: Check for commit
uses: EndBug/add-and-commit@v9
with:
author_name: maintenance
message: 'ci: maintenance `${{ steps.versioning.outputs.VCPKG_VERSION }}`'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v2

- name: Update Starfield.h
shell: pwsh
run: "& ${{ github.workspace }}/.github/make-directives.ps1 ${{ github.workspace }}/CommonLibSF"

- name: Enforce style formatting
uses: DoozyX/[email protected]
with:
source: "."
exclude: "./docs"
extensions: "c,cc,cpp,cppm,cxx,h,hpp,hxx,inl,inc,ixx,mxx"
clangFormatVersion: 16
inplace: True

- name: Update vcpkg version-date
id: versioning
shell: pwsh
run: "& ${{ github.workspace }}/.github/update-registry.ps1 ${{ github.workspace }}"

- name: Check for success
run: exit 1
if: ${{ steps.versioning.outputs.VCPKG_SUCCESS == 'false' }}

- name: Check for commit
uses: EndBug/add-and-commit@v9
with:
author_name: maintenance
message: "ci: maintenance `${{ steps.versioning.outputs.VCPKG_VERSION }}`"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 01e2984

Please sign in to comment.