forked from raspberrypi/rpi-imager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
109 lines (104 loc) · 3.79 KB
/
.gitlab-ci.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
build-fedora:
stage: build
parallel:
matrix:
- IMAGE: fedora-build
TAG: [docker-amd64, docker-aarch64-ci]
image: registry.git.beagleboard.org/jkridner/${IMAGE}
tags:
- ${TAG}
before_script:
- sudo dnf install -y git gcc gcc-c++ make cmake libarchive-devel libcurl-devel lzma-sdk-devel openssl-devel qt5-qtbase-devel qt5-qtquickcontrols2-devel qt5-qtsvg-devel qt5-linguist xz-devel
script:
- mkdir -p build && cd build && cmake ../src
- make
- mkdir -p ../public
- cp bb-imager ../public/bb-imager-fedora-${TAG}
artifacts:
paths:
- public
build-debian:
stage: build
parallel:
matrix:
- IMAGE: debian-build
TAG: [docker-amd64, docker-aarch64-ci]
#TAG: [docker-amd64, docker-aarch64-ci, docker-armhf]
#TAG: [docker-amd64, docker-aarch64-ci, docker-armhf, docker-riscv64-ci]
image: registry.git.beagleboard.org/jkridner/${IMAGE}
tags:
- ${TAG}
before_script:
- apt update && apt install -y --no-install-recommends build-essential devscripts debhelper cmake git libarchive-dev
libcurl4-gnutls-dev qtbase5-dev qtbase5-dev-tools qtdeclarative5-dev libqt5svg5-dev qttools5-dev libgnutls28-dev
qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtquick-templates2
qml-module-qtquick-window2 qml-module-qtgraphicaleffects liblzma-dev
script:
- debuild -uc -us
- mkdir -p public
- cp ../*.deb public/
artifacts:
paths:
- public
build-macos:
stage: build
tags:
- macos
script:
- export PATH="$PATH:/opt/local/bin:/opt/local/libexec/qt5/bin"
- mkdir -p public
- mkdir build && cd build && cmake ../src
- make
- security unlock-keychain -p "${MACOS_PASSWORD}" ${HOME}/Library/Keychains/login.keychain
- macdeployqt bb-imager.app -qmldir="/opt/local/libexec/qt5/qml" -codesign="${MACOS_KEY_ID}" -hardened-runtime -dmg -timestamp
- export VER="$(/usr/libexec/PlistBuddy -c 'print ":CFBundleShortVersionString"' bb-imager.app/Contents/Info.plist)"
- mv bb-imager.dmg bb-imager-$VER.dmg
- codesign --timestamp --sign "${MACOS_KEY_ID}" bb-imager-$VER.dmg
- otool -L bb-imager.app/Contents/MacOS/bb-imager
- codesign -dvv bb-imager-$VER.dmg
- ditto -c -k --sequesterRsrc --keepParent bb-imager-$VER.dmg bb-imager.zip
- xcrun notarytool store-credentials --apple-id "${MACOS_ID}" --password "${MACOS_NOTARY_PASSWORD}" --team-id "${MACOS_TEAM_ID}" notary-credentials
- xcrun notarytool submit bb-imager.zip --keychain-profile "notary-credentials" --wait
- xcrun stapler staple bb-imager-$VER.dmg
- spctl -a -v --type install bb-imager.app
- cp -r bb-imager-$VER.dmg ../public
artifacts:
paths:
- public
build-windows:
image: registry.git.beagleboard.org/jkridner/mxe:latest
stage: build
tags: ["docker-amd64"]
script:
- env
- i686-w64-mingw32.static-cmake --version
- mkdir -p build && cd build && i686-w64-mingw32.static-cmake ../src
- make || true
- i686-w64-mingw32.static-cmake ../src
- make
- mkdir -p ../public/windows
- cp bb-imager.exe dependencies/*/*.exe ../public/windows
artifacts:
paths:
- public
pages:
image: registry.git.beagleboard.org/jkridner/debian-build
stage: deploy
tags:
- docker-amd64
dependencies:
- "build-debian: [debian-build, docker-amd64]"
- "build-debian: [debian-build, docker-aarch64-ci]"
- "build-fedora: [fedora-build, docker-amd64]"
- "build-fedora: [fedora-build, docker-aarch64-ci]"
#- "build: [debian-build, docker-armhf]"
#- "build: [debian-build, docker-riscv64-ci]"
- "build-macos"
- "build-windows"
script:
- git rev-parse HEAD > public/git-tag.txt
- git show -s --format=%ci HEAD > public/git-date.txt
- apindex public
artifacts:
paths:
- public