-
Notifications
You must be signed in to change notification settings - Fork 1k
Use github workflows for CI #419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1c839e2
Add Github Actions workflows
piksel e554aa5
Don't fail tests for OS quirks
piksel a09a0b7
Only build master on push and upload PR nupkgs
piksel 0f7ce75
Use latest .NET Core version and cleanup
piksel c641bec
Switch test project to latest .NET core
piksel 09b30dc
Simplify build/test matrix
piksel afa4b74
Fix syntax errors and editorconfig for YAML
piksel d276042
Fix on-push workflow matrix
piksel 26a42df
Fix lingering syntax errors
piksel e5dc520
Update workflows
piksel 424196a
Update workflows
piksel e56e73b
Update workflows
piksel a8efde9
Update workflows
piksel 77e4953
Update workflows
piksel 7aa468f
Update workflows
piksel 8fd061d
Use VS 2019 in AppVeyor CI
piksel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| name: Build master on push | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ master ] | ||
|
|
||
| jobs: | ||
| BuildAndTest: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| configuration: ['Debug', 'Release'] | ||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||
| include: | ||
| - os: windows-latest | ||
| libframework: net45 | ||
| - os: ubuntu-latest | ||
| libframework: netstandard2 | ||
| - os: macos-latest | ||
| libframework: netstandard2 | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: Setup .NET Core | ||
| if: matrix.libframework == 'netstandard2' | ||
| uses: actions/setup-dotnet@v1 | ||
| with: | ||
| dotnet-version: 2.2.108 | ||
|
|
||
| - name: Build library | ||
| run: dotnet build -c ${{ matrix.configuration }} -f ${{ matrix.libframework }} src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj | ||
|
|
||
| - name: Restore test dependencies | ||
| run: dotnet restore test/ICSharpCode.SharpZipLib.Tests/ICSharpCode.SharpZipLib.Tests.csproj | ||
|
|
||
| - name: Run tests (.NET Core) | ||
| run: dotnet test -c ${{ matrix.configuration }} -f netcoreapp2.0 | ||
|
|
||
| - name: Run tests (.NET Framework) | ||
| if: matrix.os == 'windows' | ||
| run: dotnet test -c ${{ matrix.configuration }} -f net45 | ||
|
|
||
|
|
||
| Package: | ||
| if: 1 == 2 | ||
| needs: [BuildAndTest] | ||
| runs-on: windows-latest | ||
| env: | ||
| NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| fetch-depth: 0 | ||
| # ref: v1.2.0 | ||
|
|
||
| - name: Setup .NET Core | ||
| uses: actions/setup-dotnet@v1 | ||
| with: | ||
| dotnet-version: 2.2.108 | ||
| source-url: https://nuget.pkg.github.com/icsharpcode/index.json | ||
|
|
||
| #- name: Fix sourcelink | ||
| # run: git fetch && git checkout origin/master -- src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj assets/ICSharpCode.SharpZipLib.snk | ||
|
|
||
| - name: Build library for .NET Standard 2 | ||
| run: dotnet build -c Release -f netstandard2 src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj | ||
| - name: Build library for .NET Framework 4.5 | ||
| run: dotnet build -c Release -f net45 src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj | ||
|
|
||
| - name: Create nuget package | ||
| run: dotnet pack src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj --configuration Release --output dist /p:Version=$(git describe --abbrev | % { $_.substring(1) }) | ||
|
|
||
| - name: Show package name | ||
| run: ls dist\*.nupkg | ||
|
|
||
| - name: Publish the package to GPR | ||
| if: false == true | ||
| run: dotnet nuget push dist\*.nupkg | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| name: Build and Test PR | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| jobs: | ||
| Build: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| configuration: ['Debug', 'Release'] | ||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||
| include: | ||
| - os: windows-latest | ||
| libframework: net45 | ||
| - os: ubuntu-latest | ||
| libframework: netstandard2 | ||
| - os: macos-latest | ||
| libframework: netstandard2 | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: Setup .NET Core | ||
| if: matrix.libframework == 'netstandard2' | ||
| uses: actions/setup-dotnet@v1 | ||
| with: | ||
| dotnet-version: 2.2.108 | ||
|
|
||
| - name: Build library | ||
| run: dotnet build -c ${{ matrix.configuration }} -f ${{ matrix.libframework }} src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj | ||
|
|
||
| - name: Restore test dependencies | ||
| run: dotnet restore test/ICSharpCode.SharpZipLib.Tests/ICSharpCode.SharpZipLib.Tests.csproj | ||
|
|
||
| - name: Run tests (.NET Core) | ||
| run: dotnet test -c ${{ matrix.configuration }} -f netcoreapp2.0 | ||
|
|
||
| - name: Runt tests (.NET Framework) | ||
| if: matrix.os == 'windows' | ||
| run: dotnet test -c ${{ matrix.configuration }} -f net45 | ||
|
|
||
| Test: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| configuration: ['Debug', 'Release'] | ||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||
| include: | ||
| - os: windows-latest | ||
| libframework: net45 | ||
| - os: ubuntu-latest | ||
| libframework: netstandard2 | ||
| - os: macos-latest | ||
| libframework: netstandard2 | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: Setup .NET Core | ||
| if: matrix.libframework == 'netstandard2' | ||
| uses: actions/setup-dotnet@v1 | ||
| with: | ||
| dotnet-version: 2.2.108 | ||
|
|
||
| - name: Restore test dependencies | ||
| run: dotnet restore | ||
|
|
||
| - name: Run tests (.NET Core) | ||
| run: dotnet test -c ${{ matrix.configuration }} -f netcoreapp2.0 | ||
|
|
||
| - name: Run tests (.NET Framework) | ||
| if: matrix.os == 'windows' | ||
| run: dotnet test -c ${{ matrix.configuration }} -f net45 | ||
|
|
||
| Pack: | ||
| needs: [Build, Test] | ||
| runs-on: windows-latest | ||
| env: | ||
| NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup .NET Core | ||
| uses: actions/setup-dotnet@v1 | ||
| with: | ||
| dotnet-version: 2.2.108 | ||
| source-url: https://nuget.pkg.github.com/icsharpcode/index.json | ||
|
|
||
| - name: Build library for .NET Standard 2 | ||
| run: dotnet build -c Release -f netstandard2 src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj | ||
| - name: Build library for .NET Framework 4.5 | ||
| run: dotnet build -c Release -f net45 src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj | ||
|
|
||
| - name: Create nuget package | ||
| run: dotnet pack src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj --configuration Release --output dist /p:Version=$(git describe --abbrev | % { $_.substring(1) })-PR | ||
|
|
||
| - name: Upload nuget package artifact | ||
| uses: actions/upload-artifact@v2 | ||
| with: | ||
| name: Nuget package | ||
| path: dist/*.nupkg |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is 2.2.108 the appropriate version to use at this point? (I mean, I think it's one of the versions that's out of support, and I think the other PR for the nullability changes would require a v3 SDK for C#8 support)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think using the latest stable would be more appropriate