-
Notifications
You must be signed in to change notification settings - Fork 32
92 lines (89 loc) · 2.84 KB
/
test_macos.yaml
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
name: macOS Test
on:
push:
paths:
- 'osx/**'
- '.github/workflows/test_macos.yaml'
pull_request:
paths:
- 'osx/**'
- '.github/workflows/test_macos.yaml'
jobs:
build_dmg:
runs-on: ${{ matrix.runs_on }}
strategy:
matrix:
# macos-latest (ATM macos-14) runs on Apple Silicon,
# macos-13 runs on Intel
runs_on: [macos-latest, macos-13]
name: macOS build dmg ( ${{ matrix.runs_on }} )
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install Platypus
run: |
source ci/osx_ci.sh
install_platypus
- name: Install build dependencies
run: |
brew install pkg-config cmake ninja
- name: Create macOS App Bundle with extras [dev]
run: |
source ci/osx_ci.sh
cd osx
./create-osx-bundle.sh -e "dev"
- name: Test Fix bundle metadata
run: |
source ci/osx_ci.sh
cd osx
./fix-bundle-metadata.sh build/Kivy.app -v "1.2.3"
./fix-bundle-metadata.sh build/Kivy.app -v "master"
- name: Test Relocation
run: |
source ci/osx_ci.sh
cd osx
./relocate.sh build/Kivy.app
- name: Test dmg creation and store it in osx_artifacts
run: |
source ci/osx_ci.sh
cd osx
./create-osx-dmg.sh build/Kivy.app Kivy
cd ..
mkdir osx_artifacts
mv osx/Kivy.dmg osx_artifacts/${{ matrix.runs_on }}-Kivy.dmg
- name: Upload dmg as artifact
uses: actions/upload-artifact@v3
with:
name: KivySDKPackager
path: osx_artifacts
test_dmg:
needs: build_dmg
runs-on: ${{ matrix.runs_on }}
strategy:
matrix:
# macos-latest (ATM macos-14) runs on Apple Silicon,
# macos-13 runs on Intel
runs_on: [macos-latest, macos-13]
name: macOS test dmg ( ${{ matrix.runs_on }} )
steps:
- uses: actions/checkout@v4
- name: Download dmg from artifacts
uses: actions/download-artifact@v3
with:
name: KivySDKPackager
path: osx_artifacts
- name: Mount build from macos-latest runner on macos-13 runner
if: ${{ matrix.runs_on == 'macos-13' }}
run: hdiutil attach osx_artifacts/macos-latest-Kivy.dmg -mountroot .
- name: Mount build from macos-13 runner on macos-latest runner
if: ${{ matrix.runs_on != 'macos-latest' }}
run: hdiutil attach osx_artifacts/macos-13-Kivy.dmg -mountroot .
- name: Copy Kivy.app to Applications
run: cp -R Kivy/Kivy.app /Applications/Kivy.app
- name: Activate Kivy.app venv and test kivy
run: |
source ci/osx_ci.sh
activate_app_venv_and_test_kivy