Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxRev-Dev committed May 10, 2023
1 parent 9b11d64 commit 907c7c7
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 29 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- main
- 'feature/**'
- 'hotfix/**'
pull_request:
branches:
- main
Expand All @@ -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:
Expand Down Expand Up @@ -96,11 +89,18 @@ 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 }}
- 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 }}
make -f push-packages-makefile BUILD_ARCH=${{ matrix.arch }} BUILD_NUMBER_TAIL=${{ github.run_number }}
1 change: 0 additions & 1 deletion nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="github" value="https://nuget.pkg.github.com/MaxRev-Dev/index.json" />
<add key="local-nuget" value="./nuget" />
</packageSources>
<packageSourceCredentials>
<github>
Expand Down
2 changes: 1 addition & 1 deletion osx/RID.opt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# gdal.netcore package automation
#
# Linux Runtime Identifier
# MacOS Runtime Identifier
#
BASE=$(PWD)
BASE_RUNTIME_RID=osx
Expand Down
5 changes: 2 additions & 3 deletions osx/gdal-makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down
2 changes: 1 addition & 1 deletion osx/test-makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions shared/GdalCore.opt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ----------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MaxRev.Gdal.Core" Version="3.6.7.*" />
<PackageReference Include="MaxRev.Gdal.Core" Version="3.7.0.*" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.3" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Platforms>x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MaxRev.Gdal.Core" Version="3.6.7.*" />
<PackageReference Include="MaxRev.Gdal.Core" Version="3.7.0.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
Expand Down
2 changes: 1 addition & 1 deletion tests/MaxRev.Gdal.Core.Tests/MaxRev.Gdal.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<RootNamespace>MaxRev.Gdal.Core.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MaxRev.Gdal.Core" Version="3.6.7.*" />
<PackageReference Include="MaxRev.Gdal.Core" Version="3.7.0.*" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion unix/gdal-makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down
4 changes: 2 additions & 2 deletions win/fetch-makefile.vc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
7 changes: 0 additions & 7 deletions win/partials.psm1
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 907c7c7

Please sign in to comment.