forked from GNOME/meld
-
Notifications
You must be signed in to change notification settings - Fork 121
114 lines (96 loc) · 3.57 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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)"
# Cache downloaded sources. This shouldn't really depend on the jhbuildrc-custom
# TODO: Figure out a better cache key for sources.
- uses: actions/cache@v3
with:
path: |
/Users/runner/Sources
key: ${{ hashFiles('osx/jhbuildrc-custom') }}
- 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