-
Notifications
You must be signed in to change notification settings - Fork 804
63 lines (51 loc) · 2.3 KB
/
macos-build-and-test.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
name: macOS Build and Test
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: macOS Build and Test
runs-on: macos-14
env:
CRAFT_TARGET: macos-clang-arm64
CRAFT_MASTER_LOCATION: ${{ github.workspace }}/CraftMaster
CRAFT_MASTER_CONFIG: ${{ github.workspace }}/craftmaster.ini
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: List Xcode installations
run: sudo ls -1 /Applications | grep "Xcode"
- name: Select Xcode 15.3
run: sudo xcode-select -s /Applications/Xcode_15.3.app/Contents/Developer
- name: Restore cache
uses: actions/cache@v4
with:
path: ~/cache
key: macos-latest-${{ env.CRAFT_TARGET }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Homebrew dependencies
run: |
brew install inkscape
- name: Download Craft
run: |
git clone -q --depth=1 https://invent.kde.org/packaging/craftmaster.git ${{ env.CRAFT_MASTER_LOCATION }}
- name: Add Nextcloud client blueprints
run: |
python "${{ env.CRAFT_MASTER_LOCATION }}/CraftMaster.py" --config "${{ env.CRAFT_MASTER_CONFIG }}" --target ${{ env.CRAFT_TARGET }} -c --add-blueprint-repository https://github.com/nextcloud/desktop-client-blueprints.git
- name: Setup Craft
run: |
python "${{ env.CRAFT_MASTER_LOCATION }}/CraftMaster.py" --config "${{ env.CRAFT_MASTER_CONFIG }}" --target ${{ env.CRAFT_TARGET }} -c craft
- name: Install Craft Nextcloud client dependencies
run: |
python "${{ env.CRAFT_MASTER_LOCATION }}/CraftMaster.py" --config "${{ env.CRAFT_MASTER_CONFIG }}" --target ${{ env.CRAFT_TARGET }} -c --install-deps nextcloud-client
- name: Build client
run: |
python "${{ env.CRAFT_MASTER_LOCATION }}/CraftMaster.py" --config "${{ env.CRAFT_MASTER_CONFIG }}" --target ${{ env.CRAFT_TARGET }} -c --src-dir ${{ github.workspace }} nextcloud-client
- name: Run tests
run: |
cd ${{ github.workspace }}/${{ env.CRAFT_TARGET }}/build/nextcloud-client/work/build
ctest --output-on-failure --output-junit testResult.xml