From 27c3a28140d813bde3519ed0dbc84427bfe3e0d2 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Fri, 31 Oct 2025 02:26:05 +0200 Subject: [PATCH] Add initial CI Currently the tests can only run on macOS --- .github/workflows/build.yml | 45 +++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 37 ++++++++++++++++++++++++++++++ global.json | 5 +++++ 3 files changed, 87 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/test.yml create mode 100644 global.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..548006ad --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +name: Build + +on: + push: + branches: [ main, master, dev/** ] + pull_request: + branches: [ main, master ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' }} + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [macos-latest] + configuration: [Release] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '6.x' + + - name: Install Mono + run: | + brew install --cask mono-mdk + + - name: Build and pack + run: make prepare build nuget CONFIGURATION=${{ matrix.configuration }} + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: build-artifacts-${{ matrix.os }}-${{ matrix.configuration }} + path: | + bin/Nuget/ + retention-days: 7 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..94b97226 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: Tests + +on: + push: + branches: [ main, master, dev/** ] + pull_request: + branches: [ main, master ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' }} + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [macos-latest] + configuration: [Release] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '6.x' + + - name: Install Mono + run: | + brew install --cask mono-mdk + + - name: Run tests + run: make prepare all check CONFIGURATION=${{ matrix.configuration }} diff --git a/global.json b/global.json new file mode 100644 index 00000000..eaeb84d6 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "6.0.428" + } +} \ No newline at end of file