-
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 2.08 KB
/
ci.yml
File metadata and controls
73 lines (61 loc) · 2.08 KB
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
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
build-test:
name: Build, test, package
runs-on: macos-latest
env:
CI_REQUIRE_SIGNED_PACKAGE: "0"
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Cache build artifacts
uses: actions/cache@v4
with:
path: |
.build
~/Library/Caches/org.swift.swiftpm
key: ${{ runner.os }}-swift-${{ hashFiles('Package.swift') }}-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ runner.os }}-swift-
- name: Show toolchain
run: swift --version
- name: Validate scripts
run: |
sh -n Scripts/build-app.sh
sh -n Scripts/install-local.sh
sh -n Scripts/package-release.sh
sh -n Scripts/verify-package.sh
sh -n Scripts/sign-notarize-package.sh
- name: Build
run: make build
- name: Test
run: make test
- name: Build app bundles
run: make app
- name: Build installer package
run: make package
- name: Build summary
run: |
find dist -maxdepth 1 -name 'DevStackMenu-*.pkg' -type f | sort
PKG_PATH="$(find dist -maxdepth 1 -name 'DevStackMenu-*.pkg' -type f | sort | head -n 1)"
pkgutil --expand "$PKG_PATH" /tmp/devstackmenu-pkg-expanded
ls -la /tmp/devstackmenu-pkg-expanded
./Scripts/verify-package.sh "$PKG_PATH" "$CI_REQUIRE_SIGNED_PACKAGE"
- name: Install package (smoke)
run: |
PKG_PATH="$(find dist -maxdepth 1 -name 'DevStackMenu-*.pkg' -type f | sort | head -n 1)"
sudo installer -pkg "$PKG_PATH" -target /
[ -x /usr/local/bin/dx ]
[ -d /Applications/DevStackMenu.app ]
- name: Remove temporary install artifacts
if: always()
run: |
rm -rf /tmp/devstackmenu-pkg-expanded
sudo rm -rf /Applications/DevStackMenu.app
sudo rm -rf /Applications/Import\ Compose\ To\ DX.app
sudo rm -f /usr/local/bin/dx