GDAL 3.9.0 #220
This file contains 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
name: Windows Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
env: | |
DOTNET_INSTALL_DIR: ${{ github.workspace }}/.dotnet | |
DOTNET_VERSION: '8.0.x' | |
IS_PRE_RELEASE: ${{ !contains(github.ref, 'main') || contains(github.event.head_commit.message, '[prerelease]') }} | |
jobs: | |
BuildNugetPackages-Windows: | |
strategy: | |
matrix: | |
os: [windows-latest] | |
runs-on: ${{ matrix.os }} | |
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" | |
defaults: | |
run: | |
working-directory: win | |
steps: | |
- uses: actions/checkout@v3.0.0 | |
with: | |
fetch-depth: 0 | |
- name: NuGet - set credentials | |
uses: ./.github/actions/set-credentials | |
with: | |
api-key-github: ${{ secrets.API_KEY_GITHUB }} | |
api-key-nuget: ${{ secrets.API_KEY_NUGET }} | |
api-user-github: ${{ secrets.API_USER_GITHUB }} | |
api-user-nuget: ${{ secrets.API_USER_NUGET }} | |
shell: pwsh | |
- name: Restore cached packages | |
id: build-packages-cache-restore | |
uses: maxnowack/local-cache@main | |
with: | |
path: | | |
${{ github.workspace }}/build-win | |
${{ github.workspace }}/.dotnet | |
key: ${{ runner.os }}-packages | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Compile GDAL and create packages | |
id: compile-source | |
run: | | |
git config --system core.longpaths true | |
./install.ps1 -buildNumberTail ${{ github.run_number }} -preRelease $${{ env.IS_PRE_RELEASE }} | |
echo "GDAL_VERSION=$env:GDAL_VERSION" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append | |
- name: Store metadata as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: metadata-win-x64 | |
path: shared/bundle/targets/ | |
overwrite: true | |
- name: GDAL formats windows | |
uses: actions/upload-artifact@v4 | |
with: | |
name: formats-win | |
path: | | |
tests/gdal-formats/ | |
overwrite: true | |
- name: Store packages as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: packages-win-x64 | |
path: nuget/*.nupkg | |
overwrite: true | |
outputs: | |
gdal-version: ${{ steps.compile-source.outputs.GDAL_VERSION }} | |
TestPackages-Windows: | |
strategy: | |
matrix: | |
os: [windows-latest] | |
needs: BuildNugetPackages-Windows | |
runs-on: ${{ matrix.os }} | |
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" | |
defaults: | |
run: | |
working-directory: win | |
env: | |
GDAL_VERSION: ${{ needs.BuildNugetPackages-Windows.outputs.gdal-version }} | |
steps: | |
- uses: actions/checkout@v3.0.0 | |
with: | |
fetch-depth: 0 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: packages-win-x64 | |
path: nuget/ | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: NuGet - set credentials | |
uses: ./.github/actions/set-credentials | |
with: | |
api-key-github: ${{ secrets.API_KEY_GITHUB }} | |
api-key-nuget: ${{ secrets.API_KEY_NUGET }} | |
api-user-github: ${{ secrets.API_USER_GITHUB }} | |
api-user-nuget: ${{ secrets.API_USER_NUGET }} | |
shell: pwsh | |
- name: Test packages | |
run: ./test.ps1 -buildNumberTail ${{ github.run_number }} -preRelease $${{ env.IS_PRE_RELEASE }} | |
shell: pwsh | |
PushPackages-Windows: | |
needs: TestPackages-Windows | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" | |
defaults: | |
run: | |
working-directory: unix | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: packages-win* | |
merge-multiple: true | |
path: nuget/ | |
- name: NuGet - set credentials | |
uses: ./.github/actions/set-credentials | |
with: | |
api-key-github: ${{ secrets.API_KEY_GITHUB }} | |
api-key-nuget: ${{ secrets.API_KEY_NUGET }} | |
api-user-github: ${{ secrets.API_USER_GITHUB }} | |
api-user-nuget: ${{ secrets.API_USER_NUGET }} | |
shell: pwsh | |
- name: Push packages | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
run: | | |
make -f push-packages-makefile BUILD_NUMBER_TAIL=${{ github.run_number }} API_KEY_GITHUB=${{ secrets.API_KEY_GITHUB }} API_KEY_NUGET=${{ secrets.API_KEY_NUGET }} |