Skip to content

Split github workflow into separate jobs #32

Split github workflow into separate jobs

Split github workflow into separate jobs #32

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-environment:
name: Build Environment
runs-on: macos-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Check System
run: |
which brew || echo "brew not found"
which git || echo "git not found"
- name: Setup Homebrew & Various Tools
run: |
#/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install git ccache autoconf libtool automake pkg-config sassc optipng python bison flex cmake itstool
- name: Setup JHbuild
run: |
ln -sf $PWD/osx/jhbuildrc-custom $HOME/.jhbuildrc-custom
/bin/bash -c "$(curl -fsSL https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/gtk-osx-setup.sh)"
- uses: actions/cache@v3
with:
path: |
/Users/runner/gtk
key: ${{ runner.os }}-${{ hashFiles('osx/jhbuildrc-custom') }}-${{ hashFiles('osx/build_env.sh') }}
- name: Build Environment
run: |
echo Building in $HOME/gtk/inst
cd osx && /bin/bash ./build_env.sh
- name: Upload Environment
uses: actions/[email protected]
with:
name: Environment
path: /Users/runner/gtk
build-app:
name: Build Application
runs-on: build-environment
needs: build-environment
steps:
- name: FIX gir
run: |
cd osx && /bin/bash ./fix_gir.sh