From 6f51f7f416c1f35bb1e4d706bc21103b46810323 Mon Sep 17 00:00:00 2001 From: Dave Kerr Date: Fri, 28 Apr 2023 10:18:37 +0800 Subject: [PATCH 1/3] build: pull request pipeline --- .github/workflows/pull-request.yaml | 44 +++++++++++++++++++++++++++++ .gitignore | 5 ++-- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pull-request.yaml diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml new file mode 100644 index 00000000..bdd82296 --- /dev/null +++ b/.github/workflows/pull-request.yaml @@ -0,0 +1,44 @@ +name: Validate Pull Request + +on: + pull_request: + +jobs: + validate-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 }} + + 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 }} + msbuild-architecture: x64 + + - name: Build + run: ./source/SharpGL/build.ps1 + + # Upload the artifacts folder. + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: artifacts + path: | + ./source/SharpGL/artifacts/ diff --git a/.gitignore b/.gitignore index 1ff754c3..854b1686 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -#ignore thumbnails created by windows +# Ignore thumbnails created by windows / MacOS. Thumbs.db -#Ignore files build by Visual Studio +.DS_Store +# Ignore files build by Visual Studio *.user *.aps *.pch From 802c021de7ef2929ff17a4790babe392f011d0ed Mon Sep 17 00:00:00 2001 From: Dave Kerr Date: Fri, 28 Apr 2023 10:46:25 +0800 Subject: [PATCH 2/3] build: test in pipeline --- .github/workflows/pull-request.yaml | 3 +++ README.md | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index bdd82296..407f084f 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -35,6 +35,9 @@ jobs: - name: Build run: ./source/SharpGL/build.ps1 + - name: Test + run: ./source/SharpGL/test.ps1 + # Upload the artifacts folder. - name: Upload Artifacts uses: actions/upload-artifact@v3 diff --git a/README.md b/README.md index a07a5401..b1fb59e8 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Check out the [Samples](https://github.com/dwmkerr/sharpgl/wiki/Samples), they'r * [Getting Started](#getting-started) +* [Compatibility](#compatibility) * [Developer Guide](#developer-guide) * [Releasing](#releasing) * [Sample Applications](#sample-applications) @@ -80,9 +81,9 @@ All components support the .NET Framework 4.0 onwards, .NET Core 3.0 onwards and | `SharpGL.WinForms` | 4.0+ | 3.0+ | 2.1+ | | `SharpGL.WPF` | 4.0+ | 3.0+ | 2.1+ | -**Platform Comptability** +**Platform Compatibility** -Compatability across platforms is supported via framework specific components. +Compatibility across platforms is supported via framework specific components. | Platform | Support | |----------|---------------| From 01f817cdf403c2c5044c9a637257e17bfec4379b Mon Sep 17 00:00:00 2001 From: Dave Kerr Date: Fri, 28 Apr 2023 12:06:44 +0800 Subject: [PATCH 3/3] build: enable release please --- .github/workflows/main.yaml | 18 ++++++++++++++++++ .github/workflows/pull-request.yaml | 2 +- release-please-config.json | 6 ++++++ source/SharpGL/SharedAssemblyInfo.cs | 2 +- 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/main.yaml create mode 100644 release-please-config.json diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 00000000..731d0675 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,18 @@ +# The 'main' workflow is used to create the 'Release Please' pull +# request. This PR is opened when we have a new commit to main. +# See: +# https://github.com/googleapis/release-please +name: main +on: + push: + branches: + - main +jobs: + main: + runs-on: ubuntu-20.04 + steps: + - uses: google-github-actions/release-please-action@v3 + id: release + with: + token: ${{ secrets.GITHUB_TOKEN }} + package-name: sharpgl diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 407f084f..3da4d8c5 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -4,7 +4,7 @@ on: pull_request: jobs: - validate-pull-request: + pull-request: strategy: matrix: windows-version: diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000..70f8605a --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,6 @@ +{ + "release-type": "simple", + "extra-files": [ + "./source/SharpGL/SharedAssemblyInfo.cs" + ] +} diff --git a/source/SharpGL/SharedAssemblyInfo.cs b/source/SharpGL/SharedAssemblyInfo.cs index 9e3cb963..d4801ee6 100644 --- a/source/SharpGL/SharedAssemblyInfo.cs +++ b/source/SharpGL/SharedAssemblyInfo.cs @@ -3,7 +3,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyProduct("SharpGL")] -[assembly: AssemblyCopyright("Copyright © Dave Kerr 2020")] +[assembly: AssemblyCopyright("Copyright © Dave Kerr 2023")] // Version information for an assembly consists of the following four values: //