|
1 | 1 | name: Build |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - master |
7 | | - tags: |
8 | | - - "v*" |
9 | | - pull_request: |
10 | | - branches: |
11 | | - - master |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + tags: |
| 8 | + - "v*" |
| 9 | + pull_request: |
| 10 | + branches: |
| 11 | + - master |
12 | 12 | jobs: |
13 | | - Build: |
14 | | - strategy: |
15 | | - matrix: |
16 | | - options: |
17 | | - - os: ubuntu-latest |
18 | | - framework: net6.0 |
19 | | - sdk: 6.0.x |
20 | | - sdk-preview: true |
21 | | - runtime: -x64 |
22 | | - codecov: false |
23 | | - - os: macos-latest |
24 | | - framework: net6.0 |
25 | | - sdk: 6.0.x |
26 | | - sdk-preview: true |
27 | | - runtime: -x64 |
28 | | - codecov: false |
29 | | - - os: windows-latest |
30 | | - framework: net6.0 |
31 | | - sdk: 6.0.x |
32 | | - sdk-preview: true |
33 | | - runtime: -x64 |
34 | | - codecov: false |
35 | | - - os: ubuntu-latest |
36 | | - framework: net5.0 |
37 | | - runtime: -x64 |
38 | | - codecov: false |
39 | | - - os: macos-latest |
40 | | - framework: net5.0 |
41 | | - runtime: -x64 |
42 | | - codecov: false |
43 | | - - os: windows-latest |
44 | | - framework: net5.0 |
45 | | - runtime: -x64 |
46 | | - codecov: false |
47 | | - - os: ubuntu-latest |
48 | | - framework: netcoreapp3.1 |
49 | | - runtime: -x64 |
50 | | - codecov: true |
51 | | - - os: macos-latest |
52 | | - framework: netcoreapp3.1 |
53 | | - runtime: -x64 |
54 | | - codecov: false |
55 | | - - os: windows-latest |
56 | | - framework: netcoreapp3.1 |
57 | | - runtime: -x64 |
58 | | - codecov: false |
59 | | - - os: windows-latest |
60 | | - framework: netcoreapp2.1 |
61 | | - runtime: -x64 |
62 | | - codecov: false |
63 | | - - os: windows-latest |
64 | | - framework: net472 |
65 | | - runtime: -x64 |
66 | | - codecov: false |
67 | | - - os: windows-latest |
68 | | - framework: net472 |
69 | | - runtime: -x86 |
70 | | - codecov: false |
71 | | - |
72 | | - runs-on: ${{matrix.options.os}} |
73 | | - |
74 | | - steps: |
75 | | - - name: Git Config |
76 | | - shell: bash |
77 | | - run: | |
78 | | - git config --global core.autocrlf false |
79 | | - git config --global core.longpaths true |
80 | | -
|
81 | | - - name: Git Checkout |
82 | | - uses: actions/checkout@v2 |
83 | | - with: |
84 | | - fetch-depth: 0 |
85 | | - submodules: recursive |
86 | | - |
87 | | - # See https://github.com/actions/checkout/issues/165#issuecomment-657673315 |
88 | | - - name: Git Create LFS FileList |
89 | | - run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id |
90 | | - |
91 | | - - name: Git Setup LFS Cache |
92 | | - uses: actions/cache@v2 |
93 | | - id: lfs-cache |
94 | | - with: |
95 | | - path: .git/lfs |
96 | | - key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1 |
97 | | - |
98 | | - - name: Git Pull LFS |
99 | | - run: git lfs pull |
100 | | - |
101 | | - - name: NuGet Install |
102 | | - uses: NuGet/setup-nuget@v1 |
103 | | - |
104 | | - - name: NuGet Setup Cache |
105 | | - uses: actions/cache@v2 |
106 | | - id: nuget-cache |
107 | | - with: |
108 | | - path: ~/.nuget |
109 | | - key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }} |
110 | | - restore-keys: ${{ runner.os }}-nuget- |
111 | | - |
112 | | - - name: DotNet Setup Preview |
113 | | - if: ${{ matrix.options.sdk-preview == true }} |
114 | | - uses: actions/setup-dotnet@v1 |
115 | | - with: |
116 | | - dotnet-version: ${{ matrix.options.sdk }} |
117 | | - include-prerelease: true |
118 | | - |
119 | | - - name: DotNet Build |
120 | | - if: ${{ matrix.options.sdk-preview != true }} |
121 | | - shell: pwsh |
122 | | - run: ./ci-build.ps1 "${{matrix.options.framework}}" |
123 | | - env: |
124 | | - SIXLABORS_TESTING: True |
125 | | - |
126 | | - - name: DotNet Build Preview |
127 | | - if: ${{ matrix.options.sdk-preview == true }} |
128 | | - shell: pwsh |
129 | | - run: ./ci-build.ps1 "${{matrix.options.framework}}" |
130 | | - env: |
131 | | - SIXLABORS_TESTING_PREVIEW: True |
132 | | - |
133 | | - - name: DotNet Test |
134 | | - if: ${{ matrix.options.sdk-preview != true }} |
135 | | - shell: pwsh |
136 | | - run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}" |
137 | | - env: |
138 | | - SIXLABORS_TESTING: True |
139 | | - XUNIT_PATH: .\tests\ImageSharp.Tests # Required for xunit |
140 | | - |
141 | | - - name: DotNet Test Preview |
142 | | - if: ${{ matrix.options.sdk-preview == true }} |
143 | | - shell: pwsh |
144 | | - run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}" |
145 | | - env: |
146 | | - SIXLABORS_TESTING_PREVIEW: True |
147 | | - XUNIT_PATH: .\tests\ImageSharp.Tests # Required for xunit |
148 | | - |
149 | | - - name: Export Failed Output |
150 | | - uses: actions/upload-artifact@v2 |
151 | | - if: failure() |
152 | | - with: |
153 | | - name: actual_output_${{ runner.os }}_${{ matrix.options.framework }}${{ matrix.options.runtime }}.zip |
154 | | - path: tests/Images/ActualOutput/ |
155 | | - |
156 | | - - name: Codecov Update |
157 | | - uses: codecov/codecov-action@v1 |
158 | | - if: matrix.options.codecov == true && startsWith(github.repository, 'SixLabors') |
159 | | - with: |
160 | | - flags: unittests |
161 | | - |
162 | | - Publish: |
163 | | - needs: [Build] |
164 | | - |
165 | | - runs-on: ubuntu-latest |
166 | | - |
167 | | - if: (github.event_name == 'push') |
168 | | - |
169 | | - steps: |
170 | | - - name: Git Config |
171 | | - shell: bash |
172 | | - run: | |
173 | | - git config --global core.autocrlf false |
174 | | - git config --global core.longpaths true |
175 | | -
|
176 | | - - name: Git Checkout |
177 | | - uses: actions/checkout@v2 |
178 | | - with: |
179 | | - fetch-depth: 0 |
180 | | - submodules: recursive |
181 | | - |
182 | | - - name: NuGet Install |
183 | | - uses: NuGet/setup-nuget@v1 |
184 | | - |
185 | | - - name: NuGet Setup Cache |
186 | | - uses: actions/cache@v2 |
187 | | - id: nuget-cache |
188 | | - with: |
189 | | - path: ~/.nuget |
190 | | - key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }} |
191 | | - restore-keys: ${{ runner.os }}-nuget- |
192 | | - |
193 | | - - name: DotNet Pack |
194 | | - shell: pwsh |
195 | | - run: ./ci-pack.ps1 |
196 | | - |
197 | | - - name: MyGet Publish |
198 | | - shell: pwsh |
199 | | - run: | |
200 | | - dotnet nuget push .\artifacts\*.nupkg -k ${{secrets.MYGET_TOKEN}} -s https://www.myget.org/F/sixlabors/api/v2/package |
201 | | - dotnet nuget push .\artifacts\*.snupkg -k ${{secrets.MYGET_TOKEN}} -s https://www.myget.org/F/sixlabors/api/v3/index.json |
202 | | - # TODO: If github.ref starts with 'refs/tags' then it was tag push and we can optionally push out package to nuget.org |
| 13 | + Build: |
| 14 | + strategy: |
| 15 | + matrix: |
| 16 | + options: |
| 17 | + - os: ubuntu-latest |
| 18 | + framework: net6.0 |
| 19 | + sdk: 6.0.x |
| 20 | + sdk-preview: true |
| 21 | + runtime: -x64 |
| 22 | + codecov: false |
| 23 | + - os: macos-latest |
| 24 | + framework: net6.0 |
| 25 | + sdk: 6.0.x |
| 26 | + sdk-preview: true |
| 27 | + runtime: -x64 |
| 28 | + codecov: false |
| 29 | + - os: windows-latest |
| 30 | + framework: net6.0 |
| 31 | + sdk: 6.0.x |
| 32 | + sdk-preview: true |
| 33 | + runtime: -x64 |
| 34 | + codecov: false |
| 35 | + - os: ubuntu-latest |
| 36 | + framework: net5.0 |
| 37 | + runtime: -x64 |
| 38 | + codecov: false |
| 39 | + - os: macos-latest |
| 40 | + framework: net5.0 |
| 41 | + runtime: -x64 |
| 42 | + codecov: false |
| 43 | + - os: windows-latest |
| 44 | + framework: net5.0 |
| 45 | + runtime: -x64 |
| 46 | + codecov: false |
| 47 | + - os: ubuntu-latest |
| 48 | + framework: netcoreapp3.1 |
| 49 | + runtime: -x64 |
| 50 | + codecov: false |
| 51 | + - os: macos-latest |
| 52 | + framework: netcoreapp3.1 |
| 53 | + runtime: -x64 |
| 54 | + codecov: false |
| 55 | + - os: windows-latest |
| 56 | + framework: netcoreapp3.1 |
| 57 | + runtime: -x64 |
| 58 | + codecov: false |
| 59 | + - os: windows-latest |
| 60 | + framework: netcoreapp2.1 |
| 61 | + runtime: -x64 |
| 62 | + codecov: false |
| 63 | + - os: windows-latest |
| 64 | + framework: net472 |
| 65 | + runtime: -x64 |
| 66 | + codecov: false |
| 67 | + - os: windows-latest |
| 68 | + framework: net472 |
| 69 | + runtime: -x86 |
| 70 | + codecov: false |
| 71 | + |
| 72 | + runs-on: ${{matrix.options.os}} |
| 73 | + |
| 74 | + steps: |
| 75 | + - name: Git Config |
| 76 | + shell: bash |
| 77 | + run: | |
| 78 | + git config --global core.autocrlf false |
| 79 | + git config --global core.longpaths true |
| 80 | +
|
| 81 | + - name: Git Checkout |
| 82 | + uses: actions/checkout@v2 |
| 83 | + with: |
| 84 | + fetch-depth: 0 |
| 85 | + submodules: recursive |
| 86 | + |
| 87 | + # See https://github.com/actions/checkout/issues/165#issuecomment-657673315 |
| 88 | + - name: Git Create LFS FileList |
| 89 | + run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id |
| 90 | + |
| 91 | + - name: Git Setup LFS Cache |
| 92 | + uses: actions/cache@v2 |
| 93 | + id: lfs-cache |
| 94 | + with: |
| 95 | + path: .git/lfs |
| 96 | + key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1 |
| 97 | + |
| 98 | + - name: Git Pull LFS |
| 99 | + run: git lfs pull |
| 100 | + |
| 101 | + - name: NuGet Install |
| 102 | + uses: NuGet/setup-nuget@v1 |
| 103 | + |
| 104 | + - name: NuGet Setup Cache |
| 105 | + uses: actions/cache@v2 |
| 106 | + id: nuget-cache |
| 107 | + with: |
| 108 | + path: ~/.nuget |
| 109 | + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }} |
| 110 | + restore-keys: ${{ runner.os }}-nuget- |
| 111 | + |
| 112 | + - name: DotNet Setup Preview |
| 113 | + if: ${{ matrix.options.sdk-preview == true }} |
| 114 | + uses: actions/setup-dotnet@v1 |
| 115 | + with: |
| 116 | + dotnet-version: ${{ matrix.options.sdk }} |
| 117 | + include-prerelease: true |
| 118 | + |
| 119 | + - name: DotNet Build |
| 120 | + if: ${{ matrix.options.sdk-preview != true }} |
| 121 | + shell: pwsh |
| 122 | + run: ./ci-build.ps1 "${{matrix.options.framework}}" |
| 123 | + env: |
| 124 | + SIXLABORS_TESTING: True |
| 125 | + |
| 126 | + - name: DotNet Build Preview |
| 127 | + if: ${{ matrix.options.sdk-preview == true }} |
| 128 | + shell: pwsh |
| 129 | + run: ./ci-build.ps1 "${{matrix.options.framework}}" |
| 130 | + env: |
| 131 | + SIXLABORS_TESTING_PREVIEW: True |
| 132 | + |
| 133 | + - name: DotNet Test |
| 134 | + if: ${{ matrix.options.sdk-preview != true }} |
| 135 | + shell: pwsh |
| 136 | + run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}" |
| 137 | + env: |
| 138 | + SIXLABORS_TESTING: True |
| 139 | + XUNIT_PATH: .\tests\ImageSharp.Tests # Required for xunit |
| 140 | + |
| 141 | + - name: DotNet Test Preview |
| 142 | + if: ${{ matrix.options.sdk-preview == true }} |
| 143 | + shell: pwsh |
| 144 | + run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}" |
| 145 | + env: |
| 146 | + SIXLABORS_TESTING_PREVIEW: True |
| 147 | + XUNIT_PATH: .\tests\ImageSharp.Tests # Required for xunit |
| 148 | + |
| 149 | + - name: Export Failed Output |
| 150 | + uses: actions/upload-artifact@v2 |
| 151 | + if: failure() |
| 152 | + with: |
| 153 | + name: actual_output_${{ runner.os }}_${{ matrix.options.framework }}${{ matrix.options.runtime }}.zip |
| 154 | + path: tests/Images/ActualOutput/ |
| 155 | + |
| 156 | + Publish: |
| 157 | + needs: [Build] |
| 158 | + |
| 159 | + runs-on: ubuntu-latest |
| 160 | + |
| 161 | + if: (github.event_name == 'push') |
| 162 | + |
| 163 | + steps: |
| 164 | + - name: Git Config |
| 165 | + shell: bash |
| 166 | + run: | |
| 167 | + git config --global core.autocrlf false |
| 168 | + git config --global core.longpaths true |
| 169 | +
|
| 170 | + - name: Git Checkout |
| 171 | + uses: actions/checkout@v2 |
| 172 | + with: |
| 173 | + fetch-depth: 0 |
| 174 | + submodules: recursive |
| 175 | + |
| 176 | + - name: NuGet Install |
| 177 | + uses: NuGet/setup-nuget@v1 |
| 178 | + |
| 179 | + - name: NuGet Setup Cache |
| 180 | + uses: actions/cache@v2 |
| 181 | + id: nuget-cache |
| 182 | + with: |
| 183 | + path: ~/.nuget |
| 184 | + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }} |
| 185 | + restore-keys: ${{ runner.os }}-nuget- |
| 186 | + |
| 187 | + - name: DotNet Pack |
| 188 | + shell: pwsh |
| 189 | + run: ./ci-pack.ps1 |
| 190 | + |
| 191 | + - name: MyGet Publish |
| 192 | + shell: pwsh |
| 193 | + run: | |
| 194 | + dotnet nuget push .\artifacts\*.nupkg -k ${{secrets.MYGET_TOKEN}} -s https://www.myget.org/F/sixlabors/api/v2/package |
| 195 | + dotnet nuget push .\artifacts\*.snupkg -k ${{secrets.MYGET_TOKEN}} -s https://www.myget.org/F/sixlabors/api/v3/index.json |
| 196 | + # TODO: If github.ref starts with 'refs/tags' then it was tag push and we can optionally push out package to nuget.org |
0 commit comments