diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 10eee17..d4530af 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -13,8 +13,8 @@ jobs: name: Build for Windows (x64) runs-on: windows-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v6 - name: Set up MSVC x64 build environment uses: ilammy/msvc-dev-cmd@v1 @@ -28,8 +28,8 @@ jobs: - name: Rename binary for release run: ren build\windows-msvc-x64-release\sim.exe sim-x64.exe - - name: Upload x64 binary as artifact - uses: actions/upload-artifact@v4 + - name: Upload x64 binary as artifact + uses: actions/upload-artifact@v6 with: name: binary-x64 # Explicit artifact name path: build\windows-msvc-x64-release\sim-x64.exe # Explicit file path to upload @@ -38,8 +38,8 @@ jobs: name: Build for Windows (x86) runs-on: windows-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v6 - name: Set up MSVC x86 build environment uses: ilammy/msvc-dev-cmd@v1 @@ -53,8 +53,8 @@ jobs: - name: Rename binary for release run: ren build\windows-msvc-x86-release\sim.exe sim-x86.exe - - name: Upload x86 binary as artifact - uses: actions/upload-artifact@v4 + - name: Upload x86 binary as artifact + uses: actions/upload-artifact@v6 with: name: binary-x86 # Explicit artifact name path: build\windows-msvc-x86-release\sim-x86.exe # Explicit file path to upload @@ -64,20 +64,20 @@ jobs: needs: [build-x64, build-x86] # Depends on both successful builds runs-on: ubuntu-latest # ubuntu-latest is sufficient for creating the release steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v6 - name: Create a directory for binaries run: mkdir release_binaries - - name: Download x64 binary - uses: actions/download-artifact@v4 + - name: Download x64 binary + uses: actions/download-artifact@v7 with: name: binary-x64 path: release_binaries - - name: Download x86 binary - uses: actions/download-artifact@v4 + - name: Download x86 binary + uses: actions/download-artifact@v7 with: name: binary-x86 path: release_binaries diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index e0ee708..b76f596 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -1,6 +1,7 @@ name: Code Quality Check on: + workflow_dispatch: push: branches: - master @@ -25,7 +26,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Verify clang-tools installation run: | @@ -35,8 +36,10 @@ jobs: - name: Check code formatting for compliance run: | + New-Item -ItemType Directory -Path ci-artifacts -Force | Out-Null $files = Get-ChildItem -Path src -Recurse -Include *.cpp,*.h - clang-format --dry-run --Werror --style=file $files + clang-format --dry-run --Werror --style=file $files 2>&1 | Tee-Object -FilePath ci-artifacts/clang-format.log + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } shell: pwsh # Use PowerShell for Get-ChildItem - name: Set up MSVC build environment for the script @@ -45,6 +48,14 @@ jobs: arch: x64 - name: Run clang-tidy - shell: cmd + shell: pwsh run: | - scripts\lint.bat + cmd /c scripts\lint.bat 2>&1 | Tee-Object -FilePath ci-artifacts/clang-tidy.log + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + + - name: Upload lint artifacts + if: always() + uses: actions/upload-artifact@v6 + with: + name: code-quality-artifacts-${{ github.run_id }} + path: ci-artifacts/