We can build locally - GH? #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 gnu-sed | |
- 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: Compress Environment | |
working-directory: / | |
shell: 'bash' | |
run: | | |
tar -czf /Users/runner/work/environment.tar.gz $HOME/gtk $HOME/.new_local | |
- name: Upload Environment | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: Environment | |
path: | | |
/Users/runner/work/environment.tar.gz | |
build-app: | |
name: Build Application | |
runs-on: macos-latest | |
needs: build-environment | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
- 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)" | |
- name: Extract Environment | |
working-directory: / | |
shell: 'bash' | |
run: | | |
brew install git ccache autoconf libtool automake pkg-config sassc optipng python bison flex cmake itstool gnu-sed intltool | |
pwd | |
mkdir -p $HOME/Source | |
tar -xzf /Users/runner/work/meld/meld/Environment/environment.tar.gz | |
rm -f /Users/runner/work/meld/meld/Environment/environment.tar.gz | |
ls $HOME/gtk | |
- name: FIX gir | |
run: | | |
cd osx && /bin/bash ./fix_gir.sh | |
- name: Install Icon Theme | |
run: | | |
alias sed=gsed | |
cd osx && /bin/bash ./build_icon_theme.sh | |
- name: Install GTK Theme | |
run: | | |
cd osx && /bin/bash ./build_gtk_theme.sh | |
- name: Package | |
run: | | |
~/.new_local/bin/jhbuild run osx/build_app.sh | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: Environment | |
path: | | |
*.dmg |