Skip to content

Small Update Primes.h #290

Small Update Primes.h

Small Update Primes.h #290

Workflow file for this run

name: Build MacOS
on:
workflow_dispatch:
workflow_call:
push:
branches:
- 'master'
tags:
- '*'
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
MODE: release
TARGET_OS: osx
TARGET_ARCH: ${{ matrix.arch }}
TARGET_CPUREV: ${{ matrix.cpurev }}
JOBS: 4
strategy:
fail-fast: false
matrix:
os: [macos-11,macos-12]
arch: [x64,arm64]
cpurev: [legacy, default, modern]
steps:
# Checkout
- name: Checkout
uses: actions/checkout@v3
# Build
- name: Build
run: make -j${{ env.JOBS }}
# Binary Info
- name: Binary Info
run: |
otool -l ./build/make/bin/osx-${{ matrix.arch }}/CppCore.Example.Server
otool -l ./build/make/bin/osx-${{ matrix.arch }}/CppCore.Example.Client
otool -l ./build/make/bin/osx-${{ matrix.arch }}/CppCore.Example.UI
otool -l ./build/make/bin/osx-${{ matrix.arch }}/CppCore.Test
otool -l ./build/make/bin/osx-${{ matrix.arch }}/CppCore.Debug
# Test (X64)
- name: Test (X64)
if: matrix.arch == 'x64' && matrix.cpurev != 'modern'
run: make test
# Upload Binaries
- name: Upload Binaries
uses: actions/upload-artifact@v3
with:
name: Binaries (${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.cpurev }})
path: |
./build/make/bin/osx-${{ matrix.arch }}/*
!./build/make/bin/osx-${{ matrix.arch }}/.gitignore
# Upload lto.o
- name: Upload lto.o
uses: actions/upload-artifact@v3
with:
retention-days: 1
name: lto.o (${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.cpurev }})
path: ./build/make/obj/osx-${{ matrix.arch }}-release/**/lto.o
###########################################################################
dist:
needs: build
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [macos-12]
steps:
# Checkout
- name: Checkout
uses: actions/checkout@v3
# Download X64 Build
- name: Download X64 Build
uses: actions/download-artifact@v3
with:
name: Binaries (${{ matrix.os }}-x64-default)
path: ./build/make/bin/osx-x64/
# Download X64 lto.o
- name: Download X64 lto.o
uses: actions/download-artifact@v3
with:
name: lto.o (${{ matrix.os }}-x64-default)
path: ./build/make/obj/osx-x64-release/
# Download ARM64 Build
- name: Download ARM64 Build
uses: actions/download-artifact@v3
with:
name: Binaries (${{ matrix.os }}-arm64-default)
path: ./build/make/bin/osx-arm64/
# Download ARM64 lto.o
- name: Download ARM64 lto.o
uses: actions/download-artifact@v3
with:
name: lto.o (${{ matrix.os }}-arm64-default)
path: ./build/make/obj/osx-arm64-release/
# Load Code Signing Certificate
- name: Load Code Signing Certificate
env:
PFX_BASE64: ${{ secrets.SIGN_PFX_FILE_OSX }}
run: |
echo $PFX_BASE64 > ./certs/TrueCert.pfx.base64
base64 --decode -i ./certs/TrueCert.pfx.base64 -o ./certs/TrueCert.pfx
# Pack
- name: Distribution Packages
env:
SIGN_PFX_FILE: ../../certs/TrueCert.pfx
SIGN_PFX_PASS: ${{ secrets.SIGN_PFX_PASS_OSX }}
PUBLISHERCN: "Developer ID Application: Clint Banzhaf (43RQ46H6CR)"
PRODUCTSIGNCN: "Developer ID Installer: Clint Banzhaf (43RQ46H6CR)"
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_APPSPEC_PASS: ${{ secrets.APPLE_APPSPEC_PASS }}
APPLE_DIST_STORE: false
run: make dist
# Upload
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Packages (${{ matrix.os }})
path: ./dist/osx-10.15/*-universal.pkg
# Upload to Github Release
- name: Upload to Github Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.PAT_GITHUB_ACTIONS }}
files: ./dist/osx-10.15/*-universal.pkg
###########################################################################
dist-store:
needs: build
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [macos-12]
steps:
# Checkout
- name: Checkout
uses: actions/checkout@v3
# Download X64 Build
- name: Download X64 Build
uses: actions/download-artifact@v3
with:
name: Binaries (${{ matrix.os }}-x64-default)
path: ./build/make/bin/osx-x64/
# Download X64 lto.o
- name: Download X64 lto.o
uses: actions/download-artifact@v3
with:
name: lto.o (${{ matrix.os }}-x64-default)
path: ./build/make/obj/osx-x64-release/
# Download ARM64 Build
- name: Download ARM64 Build
uses: actions/download-artifact@v3
with:
name: Binaries (${{ matrix.os }}-arm64-default)
path: ./build/make/bin/osx-arm64/
# Download ARM64 lto.o
- name: Download ARM64 lto.o
uses: actions/download-artifact@v3
with:
name: lto.o (${{ matrix.os }}-arm64-default)
path: ./build/make/obj/osx-arm64-release/
# Load Code Signing Certificate
- name: Load Code Signing Certificate
env:
PFX_BASE64: ${{ secrets.SIGN_PFX_FILE_OSX }}
run: |
echo $PFX_BASE64 > ./certs/TrueCert.pfx.base64
base64 --decode -i ./certs/TrueCert.pfx.base64 -o ./certs/TrueCert.pfx
# Pack
- name: Distribution Packages
env:
SIGN_PFX_FILE: ../../certs/TrueCert.pfx
SIGN_PFX_PASS: ${{ secrets.SIGN_PFX_PASS_OSX }}
PUBLISHERCN: "3rd Party Mac Developer Application: Clint Banzhaf (43RQ46H6CR)"
PRODUCTSIGNCN: "3rd Party Mac Developer Installer: Clint Banzhaf (43RQ46H6CR)"
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_APPSPEC_PASS: ${{ secrets.APPLE_APPSPEC_PASS }}
APPLE_DIST_STORE: true
APPLE_UPLOAD_STORE: ${{ startsWith(github.ref, 'refs/tags/0.') || startsWith(github.ref, 'refs/tags/1.') || startsWith(github.ref, 'refs/tags/2.') }}
run: make dist
# Upload
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Packages Store (${{ matrix.os }})
path: ./dist/osx-10.15/*-universal.pkg