From 907c7c75367c9393e4b73fd9eac948eff8b9daa7 Mon Sep 17 00:00:00 2001 From: MaxRev Date: Wed, 10 May 2023 23:25:46 +0300 Subject: [PATCH] Update workflow --- .github/workflows/macos.yml | 16 ++++++++-------- nuget.config | 1 - osx/RID.opt | 2 +- osx/gdal-makefile | 5 ++--- osx/test-makefile | 2 +- shared/GdalCore.opt | 4 ++-- .../MaxRev.Gdal.Core.Tests.AzureFunctions.csproj | 2 +- .../MaxRev.Gdal.Core.Tests.XUnit.csproj | 2 +- .../MaxRev.Gdal.Core.Tests.csproj | 2 +- unix/gdal-makefile | 2 +- win/fetch-makefile.vc | 4 ++-- win/partials.psm1 | 7 ------- 12 files changed, 20 insertions(+), 29 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 31c810b39..28af1b2a9 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -4,8 +4,6 @@ on: push: branches: - main - - 'feature/**' - - 'hotfix/**' pull_request: branches: - main @@ -32,11 +30,6 @@ jobs: with: fetch-depth: 0 - - name: NuGet - Update credentials - run: | - dotnet nuget update source github --store-password-in-clear-text -u ${{ secrets.API_USER_GITHUB }} -p ${{ secrets.GITHUB_TOKEN }} - dotnet nuget update source nuget.org --store-password-in-clear-text -u ${{ secrets.API_USER_NUGET }} -p ${{ secrets.API_KEY_NUGET }} - - name: Setup .NET Core SDK uses: actions/setup-dotnet@v3 with: @@ -96,6 +89,13 @@ jobs: name: osx-packages path: nuget/ + - name: NuGet - Update credentials + run: | + dotnet nuget update source github --store-password-in-clear-text -u ${{ secrets.API_USER_GITHUB }} -p ${{ secrets.API_KEY_GITHUB }} --configfile ../nuget.config + dotnet nuget update source nuget.org --store-password-in-clear-text -u ${{ secrets.API_USER_NUGET }} -p ${{ secrets.API_KEY_NUGET }} --configfile ../nuget.config + dotnet nuget add source -n local.ci ${{ github.workspace}}/nuget/ + dotnet nuget list source + - name: Test packages run: | make -f test-makefile BUILD_ARCH=${{ matrix.arch }} BUILD_NUMBER_TAIL=${{ github.run_number }} @@ -103,4 +103,4 @@ jobs: - name: Push packages if: ${{ github.event_name == 'push' && github.ref == 'main' }} run: | - make -f push-packages-makefile BUILD_ARCH=${{ matrix.arch }} BUILD_NUMBER_TAIL=${{ github.run_number }} \ No newline at end of file + make -f push-packages-makefile BUILD_ARCH=${{ matrix.arch }} BUILD_NUMBER_TAIL=${{ github.run_number }} diff --git a/nuget.config b/nuget.config index 1633614bb..da45ecc33 100644 --- a/nuget.config +++ b/nuget.config @@ -3,7 +3,6 @@ - diff --git a/osx/RID.opt b/osx/RID.opt index 98958db69..d84019166 100644 --- a/osx/RID.opt +++ b/osx/RID.opt @@ -1,7 +1,7 @@ # # gdal.netcore package automation # -# Linux Runtime Identifier +# MacOS Runtime Identifier # BASE=$(PWD) BASE_RUNTIME_RID=osx diff --git a/osx/gdal-makefile b/osx/gdal-makefile index 90168626d..dfa573cf3 100644 --- a/osx/gdal-makefile +++ b/osx/gdal-makefile @@ -65,16 +65,15 @@ init_%: @echo "$(TO) Sources restore complete" clone_%: - echo "$($(UP)_ROOT)" @if [ ! -d "$($(UP)_ROOT)" ]; then \ - $(GIT) clone $(GIT_CLONE_DEPTH) $($(UP)_ROOT); \ + $(GIT) clone $(GIT_CLONE_DEPTH) --single-branch -b $($(UP)_COMMIT_VER) $($(UP)_REPO) $($(UP)_ROOT); \ fi; reset_%: @echo "$(TO) Restoring $(LW) sources version to $($(UP)_COMMIT_VER)" @echo "$(TO) Checking for remote changes..." @cd $($(UP)_ROOT) && git fetch origin 'refs/tags/*:refs/tags/*' --force - @cd $($(UP)_ROOT) && git checkout -q $($(UP)_COMMIT_VER) --force || exit 1 + @cd $($(UP)_ROOT) && git checkout -q tags/$($(UP)_COMMIT_VER) --force || exit 1 @echo "$(TO) Resetting sources..." @cd $($(UP)_ROOT) && git reset --hard || exit 1 @echo "$(TO) Cleaning the repo before compiling from scratch..." diff --git a/osx/test-makefile b/osx/test-makefile index d9ffe7884..862f05aaf 100644 --- a/osx/test-makefile +++ b/osx/test-makefile @@ -19,7 +19,7 @@ PACKAGE_BUILD_NUMBER=$(shell echo $$(($(BUILD_NUMBER_TAIL) + 100))) any: test -### Testing linux libraries (from nuget build output) +### Testing macOS libraries (from nuget build output) test-restore: cd $(TEST_TARGET) && \ dotnet restore --ignore-failed-sources diff --git a/shared/GdalCore.opt b/shared/GdalCore.opt index 853f8d2dd..26442bf38 100644 --- a/shared/GdalCore.opt +++ b/shared/GdalCore.opt @@ -13,13 +13,13 @@ BUILD_ROOT=$(ROOTDIR_)/build-$(BASE_RUNTIME_RID) GDAL_VERSION=3.7.0 GDAL_ROOT=$(BUILD_ROOT)/gdal-source GDAL_REPO=https://github.com/OSGeo/gdal.git -GDAL_COMMIT_VER=tags/$(GDAL_VERSION)RC1 +GDAL_COMMIT_VER=v$(GDAL_VERSION)RC1 # Mar 1, 2023 PROJ_VERSION=9.2.0 PROJ_ROOT=$(BUILD_ROOT)/proj-source PROJ_REPO=https://github.com/OSGeo/PROJ.git -PROJ_COMMIT_VER=tags/$(PROJ_VERSION) +PROJ_COMMIT_VER=$(PROJ_VERSION) # ---------------------- VCPKG ---------------------- diff --git a/tests/MaxRev.Gdal.Core.Tests.AzureFunctions/MaxRev.Gdal.Core.Tests.AzureFunctions.csproj b/tests/MaxRev.Gdal.Core.Tests.AzureFunctions/MaxRev.Gdal.Core.Tests.AzureFunctions.csproj index 63ff3f2a7..f8930eaea 100644 --- a/tests/MaxRev.Gdal.Core.Tests.AzureFunctions/MaxRev.Gdal.Core.Tests.AzureFunctions.csproj +++ b/tests/MaxRev.Gdal.Core.Tests.AzureFunctions/MaxRev.Gdal.Core.Tests.AzureFunctions.csproj @@ -7,7 +7,7 @@ <_FunctionsSkipCleanOutput>true - + diff --git a/tests/MaxRev.Gdal.Core.Tests.XUnit/MaxRev.Gdal.Core.Tests.XUnit.csproj b/tests/MaxRev.Gdal.Core.Tests.XUnit/MaxRev.Gdal.Core.Tests.XUnit.csproj index 64a20a82d..4a7447a72 100644 --- a/tests/MaxRev.Gdal.Core.Tests.XUnit/MaxRev.Gdal.Core.Tests.XUnit.csproj +++ b/tests/MaxRev.Gdal.Core.Tests.XUnit/MaxRev.Gdal.Core.Tests.XUnit.csproj @@ -8,7 +8,7 @@ x64 - + diff --git a/tests/MaxRev.Gdal.Core.Tests/MaxRev.Gdal.Core.Tests.csproj b/tests/MaxRev.Gdal.Core.Tests/MaxRev.Gdal.Core.Tests.csproj index cfff5feb5..d8b646025 100644 --- a/tests/MaxRev.Gdal.Core.Tests/MaxRev.Gdal.Core.Tests.csproj +++ b/tests/MaxRev.Gdal.Core.Tests/MaxRev.Gdal.Core.Tests.csproj @@ -9,7 +9,7 @@ MaxRev.Gdal.Core.Tests - + \ No newline at end of file diff --git a/unix/gdal-makefile b/unix/gdal-makefile index 2ff09f9e2..edc5f82fb 100644 --- a/unix/gdal-makefile +++ b/unix/gdal-makefile @@ -65,7 +65,7 @@ reset_%: @echo "$(TO) Restoring $(LW) sources version to $($(UP)_COMMIT_VER)" @echo "$(TO) Checking for remote changes..." @cd $($(UP)_ROOT) && git fetch origin 'refs/tags/*:refs/tags/*' --force - @cd $($(UP)_ROOT) && git checkout -q $($(UP)_COMMIT_VER) --force || exit 1 + @cd $($(UP)_ROOT) && git checkout -q tags/$($(UP)_COMMIT_VER) --force || exit 1 @echo "$(TO) Resetting sources..." @cd $($(UP)_ROOT) && git reset --hard || exit 1 @echo "$(TO) Cleaning the repo before compiling from scratch..." diff --git a/win/fetch-makefile.vc b/win/fetch-makefile.vc index 85120e75b..e76c5d597 100644 --- a/win/fetch-makefile.vc +++ b/win/fetch-makefile.vc @@ -12,7 +12,7 @@ fetch-gdal: !ENDIF cd $(GDAL_ROOT) git fetch origin 'refs/tags/*:refs/tags/*' --force - git checkout -fq $(GDAL_COMMIT_VER) + git checkout -fq tags/$(GDAL_COMMIT_VER) git reset --hard $(GIT_CLEAN) cd $(BASE) @@ -23,7 +23,7 @@ fetch-proj: !ENDIF cd $(PROJ_ROOT) git fetch origin 'refs/tags/*:refs/tags/*' --force - git checkout -fq $(PROJ_COMMIT_VER) + git checkout -fq tags/$(PROJ_COMMIT_VER) git reset --hard $(GIT_CLEAN) cd $(BASE) \ No newline at end of file diff --git a/win/partials.psm1 b/win/partials.psm1 index 3bd377c05..c7a16d0dc 100644 --- a/win/partials.psm1 +++ b/win/partials.psm1 @@ -1,10 +1,4 @@ function Set-GdalVariables { - $env:GDAL_REPO = "https://github.com/OSGeo/gdal.git" - $env:GDAL_COMMIT_VER = "release/3.6" - - $env:PROJ_REPO = "https://github.com/OSGeo/PROJ.git" - $env:PROJ_COMMIT_VER = "7.2" - $env:VS_VERSION = "Visual Studio 17 2022" $env:SDK = "release-1930-x64" #2022 x64 $env:SDK_ZIP = "$env:SDK" + "-dev.zip" @@ -123,7 +117,6 @@ function Install-Proj { Set-Location "$PSScriptRoot" nmake -f fetch-makefile.vc fetch-proj - #Get-CloneAndCheckoutCleanGitRepo $env:PROJ_REPO $env:PROJ_COMMIT_VER $env:PROJ_SOURCE $env:ProjCmakeBuild = "$env:BUILD_ROOT\proj-cmake-temp" if ($cleanProjIntermediate) {