Skip to content

Commit

Permalink
Refactor build solution jobs into CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed May 18, 2024
1 parent 5283c8f commit 6dd0885
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
workflow_call:

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
with:
submodules: true

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2

- name: Restore NuGet Packages
run: msbuild -t:restore src/Bonsai.ML.sln

- name: Build Solution
run: msbuild src/Bonsai.ML.sln /p:Configuration=Release
17 changes: 3 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,16 @@ on:
workflow_dispatch:

jobs:
build:
build_docs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
with:
submodules: true
- name: Build Solution
uses: ./.github/workflows/build.yml

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: 7.x

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2

- name: Restore NuGet Packages
run: msbuild -t:restore src/Bonsai.ML.sln

- name: Build Solution
run: msbuild src/Bonsai.ML.sln /p:Configuration=Release

- name: Setup DocFX
run: dotnet tool restore
Expand Down

0 comments on commit 6dd0885

Please sign in to comment.