Skip to content

MacOS Test

MacOS Test #20

Workflow file for this run

name: MacOS Test
on:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [macos-13]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout Git Repository
uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
cache: true
python-version: 3.12
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: ./.venv
python-version: 3.12
- name: Setup Dependencies
run: |
conda activate ./.venv
conda info
conda install -y -c conda-forge pycairo cairo
brew install create-dmg
- name: Install Dependencies
run: |
pdm install
- name: Test
run: |
pdm run nuitka --version
pdm run dev
- name: Setup Environment Variables
run: |
echo "NUITKA_CACHE_DIR=$GITHUB_WORKSPACE/nuitka/cache" >> $GITHUB_ENV
echo "PYTHON_VERSION=$(python --version | awk '{print $2}' | cut -d '.' -f 1,2)" >> $GITHUB_ENV
- name: Cache Nuitka Cache
uses: actions/cache@v4
with:
path: ${{ env.NUITKA_CACHE_DIR }}
key: ${{ runner.os }}-${{ runner.arch }}-python-${{ env.PYTHON_VERSION }}-nuitka-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-python-${{ env.PYTHON_VERSION }}-
${{ runner.os }}-${{ runner.arch }}-python-
${{ runner.os }}-${{ runner.arch }}-
- name: Build x86 With Nuitka
if: matrix.os == 'macos-13'
run: |
set -e
pdm cli --arch x86_64 build
pdm cli --arch x86_64 dmg
- name: Build arm With Nuitka
if: matrix.os == 'macos-latest'
run: |
set -e
pdm cli --arch arm64 build
pdm cli --arch arm64 dmg
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}
path: |
dist/*.dmg
compilation-report.xml
retention-days: 1