Skip to content

Commit

Permalink
Merge pull request #224 from dwmkerr/build/pull-request
Browse files Browse the repository at this point in the history
build: move from appveyor to github actions
  • Loading branch information
dwmkerr authored Apr 28, 2023
2 parents 4ef4a48 + ccd3219 commit 21b7b6e
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 22 deletions.
47 changes: 46 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,45 @@ on:
- main
jobs:
main:
runs-on: ubuntu-20.04
runs-on: windows-2022

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1
with:
vs-version: 17.3
msbuild-architecture: x64

# Before building, restore Nuget packages and install dependencies.
- name: Install Dependencies
run: |
nuget restore source/SharpGL/SharpGL.sln
./source/SharpGL/config.ps1
# Use our own build script as it hides some unneeded warnings.
- name: Build
run: |
./source/SharpGL/build.ps1
./source/SharpGL/pack.ps1
# Test and upload coverage reports.
- name: Test
run: |
./source/SharpGL/test.ps1
./source/SharpGL/coverage.ps1
# Upload the artifacts folder.
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
./source/SharpGL/artifacts/
# Now that we know the build runs, create a release PR if needed.
steps:
- uses: google-github-actions/release-please-action@v3
id: release
Expand All @@ -19,3 +57,10 @@ jobs:
package-name: sharpgl
extra-files: |
source/SharpGL/SharedAssemblyInfo.cs
# If we are building a release (i.e. we've merged from release-please) then
# we can deploy.
- name: Publish
run: nuget push ./artifacts/packages/*.nupkg -Source 'https://api.nuget.org/v2/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}
if: ${{ steps.release.outputs.release_created }}

36 changes: 16 additions & 20 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,34 @@ on:

jobs:
pull-request:
strategy:
matrix:
windows-version:
- windows-2019
- windows-2022
visual-studio-version:
- 16.11
- 17.3
# The GitHub Actions Windows images do not contain multiple versions of
# msbuild, so we need to exclude certain combinations.
exclude:
- windows-version: windows-2019
visual-studio-version: 17.3
- windows-version: windows-2022
visual-studio-version: 16.11
runs-on: ${{ matrix.windows-version }}

runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1
with:
vs-version: ${{ matrix.visual-studio-version }}
vs-version: 17.3
msbuild-architecture: x64

# Before building, restore Nuget packages and install dependencies.
- name: Install Dependencies
run: |
nuget restore source/SharpGL/SharpGL.sln
./source/SharpGL/config.ps1
# Use our own build script as it hides some unneeded warnings.
- name: Build
run: ./source/SharpGL/build.ps1
run: |
./source/SharpGL/build.ps1
./source/SharpGL/pack.ps1
# Test and upload coverage reports.
- name: Test
run: ./source/SharpGL/test.ps1
run: |
./source/SharpGL/test.ps1
./source/SharpGL/coverage.ps1
# Upload the artifacts folder.
- name: Upload Artifacts
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SharpGL

[![Build status](https://ci.appveyor.com/api/projects/status/thfa4defh5f4itga?svg=true)](https://ci.appveyor.com/project/dwmkerr/sharpgl) [![codecov](https://codecov.io/gh/dwmkerr/sharpgl/branch/master/graph/badge.svg)](https://codecov.io/gh/dwmkerr/sharpgl) [![GuardRails badge](https://badges.guardrails.io/dwmkerr/sharpgl.svg?token=569f2cc38a148f785f3a38ef0bcf5f5964995d7ca625abfad9956b14bd06ad96&provider=github)](https://dashboard.guardrails.io/gh/dwmkerr/16780)
[![main](https://github.com/dwmkerr/sharpgl/actions/workflows/main.yaml/badge.svg)](https://github.com/dwmkerr/sharpgl/actions/workflows/main.yaml) [![codecov](https://codecov.io/gh/dwmkerr/sharpgl/branch/master/graph/badge.svg)](https://codecov.io/gh/dwmkerr/sharpgl) [![GuardRails badge](https://badges.guardrails.io/dwmkerr/sharpgl.svg?token=569f2cc38a148f785f3a38ef0bcf5f5964995d7ca625abfad9956b14bd06ad96&provider=github)](https://dashboard.guardrails.io/gh/dwmkerr/16780)

Unlock the power of OpenGL in any .NET application. SharpGL wraps all modern OpenGL features, provides helpful wrappers for advanced objects like Vertex Buffer Arrays and shaders, as well as offering a powerful Scene Graph and utility library to help you build your projects.

Expand Down

0 comments on commit 21b7b6e

Please sign in to comment.