aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
blob: 1ac1912915c03775eabbf93f100a376eb54183de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: CI
on: [push, pull_request]

env:
  BUILD_PROFILE: Release

jobs:
  build:
    runs-on: windows-2022
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Setup MSBuild
        uses: microsoft/setup-msbuild@v1.1
      - name: Build
        run: msbuild /p:Configuration=${{ env.BUILD_PROFILE }}
      - name: Extract Short Commit Hash
        id: extract
        shell: bash
        run: echo commit=$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
      - name: Upload Build Artifact
        uses: actions/upload-artifact@v3
        with:
          name: NorthstarLauncher-${{ steps.extract.outputs.commit }}
          path: |
            x64/${{ env.BUILD_PROFILE }}/*.dll
            x64/${{ env.BUILD_PROFILE }}/*.exe
            x64/${{ env.BUILD_PROFILE }}/*.pdb
            x64/${{ env.BUILD_PROFILE }}/*.txt

  format-check:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: DoozyX/clang-format-lint-action@v0.13
      with:
        source: 'NorthstarDLL NorthstarLauncher'
        exclude: 'NorthstarDLL/include loader_launcher_proxy loader_wsock32_proxy'
        extensions: 'h,cpp'
        clangFormatVersion: 13
        style: file