Browse Source

Added GH action for some simple CI

tags/v0.4.2-preview
Martin Evans 2 years ago
parent
commit
ccf635e4db
1 changed files with 48 additions and 0 deletions
  1. +48
    -0
      .github/workflows/main.yml

+ 48
- 0
.github/workflows/main.yml View File

@@ -0,0 +1,48 @@
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build: [linux-debug, linux-release, macos-debug, macos-release, windows-debug, windows-release]
include:
- build: linux-debug
os: ubuntu-latest
config: debug
- build: linux-release
os: ubuntu-latest
config: release
- build: macos-debug
os: macos-latest
config: debug
- build: macos-release
os: macos-latest
config: release
- build: windows-debug
os: windows-2019
config: debug
- build: windows-release
os: windows-2019
config: release
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.x'
# workaround for actions/setup-dotnet#155
- name: Clear package cache
run: dotnet clean LlamaSharp.sln && dotnet nuget locals all --clear
- name: Restore packages
run: dotnet restore LlamaSharp.sln
- name: Build
run: dotnet build LlamaSharp.sln -c ${{ matrix.config }} --no-restore
- name: Test
run: dotnet test LlamaSharp.sln -c ${{ matrix.config }}

Loading…
Cancel
Save