Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix maintenance.yml, formatting #15

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Loading