Skip to content
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

Feature: MacOS x64 and arm64 runtime bindings #102

Merged
merged 17 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: MacOS Build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
BuildNugetPackages-MacOS:
strategy:
matrix:
os: [self-hosted-macos-arm64,self-hosted-macos-x64]
include:
- os: self-hosted-macos-arm64
arch: arm64
- os: self-hosted-macos-x64
arch: x64

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: osx

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'

- name: Fetch VCPKG packages
run: |
make -f vcpkg-makefile BUILD_ARCH=${{ matrix.arch }}

- name: Compile PROJ
run: |
make -f gdal-makefile proj BUILD_ARCH=${{ matrix.arch }}

- name: Compile GDAL
run: |
make -f gdal-makefile gdal BUILD_ARCH=${{ matrix.arch }}

- name: Collect deps
run: |
make -f collect-deps-makefile BUILD_ARCH=${{ matrix.arch }}

- name: Create packages
run: |
make -f publish-makefile pack BUILD_ARCH=${{ matrix.arch }} BUILD_NUMBER_TAIL=${{ github.run_number }}

- name: Store packages as artifact
if: ${{ github.event_name == 'pull_request' || ((startsWith(github.ref, 'refs/heads/feature') || startsWith(github.ref, 'refs/heads/hotix')) && github.event_name == 'push') }}
uses: actions/upload-artifact@v3
with:
name: osx-packages
path: nuget/*.nupkg

TestAndPushPackages-MacOS:
strategy:
matrix:
os: [self-hosted-macos-arm64,self-hosted-macos-x64] # can be extended for x64
include:
- os: self-hosted-macos-arm64
arch: arm64
- os: self-hosted-macos-x64
arch: x64
needs: BuildNugetPackages-MacOS
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: osx

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Download artifact
uses: actions/download-artifact@v3
with:
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/

- 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 }}
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Test packages from CI

on:
push:
Expand Down
Loading