From 6dd0885aff40eeb8d6f2118bdf67d229e88ee8e2 Mon Sep 17 00:00:00 2001 From: glopesdev Date: Sat, 18 May 2024 09:33:26 +0100 Subject: [PATCH] Refactor build solution jobs into CI pipeline --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ .github/workflows/docs.yml | 17 +++-------------- 2 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..9efa0974 --- /dev/null +++ b/.github/workflows/build.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f3f3a637..66e49aed 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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