Skip to content

Commit

Permalink
Merge pull request Xpra-org#41 from cpatulea/ci
Browse files Browse the repository at this point in the history
Add CI workflow that builds gtk-osx-build for x86_64 and arm64
  • Loading branch information
totaam authored Mar 13, 2024
2 parents b3464ad + 671e103 commit dfa4920
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 1 deletion.
79 changes: 79 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Based on https://github.com/yousseb/meld/blob/4f5cce0cf6a878404307011d8da5b8c9946948af/.github/workflows/main.yml

name: Mac OS
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
# intltool needs XML::Parser, which system perl already has (don't use
# Homebrew /usr/local/bin/perl).
PERL: /usr/bin/perl

# tango-icon-theme also needs system perl, but in a different variable.
INTLTOOL_PERL: /usr/bin/perl

# Keep Python (jhbuild) stdout vs stderr in order.
PYTHONUNBUFFERED: 1

jobs:
build:
name: ${{ matrix.runner }} ${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: macos-12
arch: x86_64
- runner: macos-14
arch: arm64
steps:
- uses: actions/checkout@v3

# https://github.com/Xpra-org/xpra/blob/master/docs/Build/MacOS.md
- name: gtk-osx-setup.sh
run: sh ./gtk-osx-setup.sh

- name: Prepend jhbuild to PATH
run: echo "$HOME/.new_local/bin/" >> $GITHUB_PATH

- name: Configure `jhbuild` to use our `jhbuildrc-gtk-osx`
run: cp -af jhbuildrc-gtk-osx $HOME/.config/jhbuildrc

- name: Configure `jhbuild` to use our modules
run: cp -af jhbuildrc-custom $HOME/.config/jhbuildrc-custom

- name: jhbuild update
run: jhbuild update

- name: jhbuild bootstrap-gtk-osx
run: jhbuild bootstrap-gtk-osx

- name: jhbuild build
run: jhbuild build

- name: Upload config.log files
if: always()
uses: actions/upload-artifact@v4
with:
name: config-log-${{ matrix.runner }}-${{ matrix.arch }}
path: ~/.cache/jhbuild/build/*/config.log

- name: Upload meson logs
if: always()
uses: actions/upload-artifact@v4
with:
name: meson-logs-${{ matrix.runner }}-${{ matrix.arch }}
path: ~/.cache/jhbuild/build/*/meson-logs/meson-log.txt

- name: Zip gtk/inst directory
if: always()
run: zip -r gtk-inst.zip ~/gtk/inst/

- name: Upload gtk-inst.zip
if: always()
uses: actions/upload-artifact@v4
with:
name: gtk-inst-${{ matrix.runner }}-${{ matrix.arch }}
path: gtk-inst.zip
2 changes: 1 addition & 1 deletion jhbuildrc-custom
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_gtk_osx_use_jhbuild_python = True

setup_sdk(target="12", sdk_version="12", architectures=["x86_64"])
setup_sdk(target="12", sdk_version="12")
build_policy = "updated-deps"

modules = ["python3", "meta-osx-xpra-deps"]
Expand Down

0 comments on commit dfa4920

Please sign in to comment.