-
Notifications
You must be signed in to change notification settings - Fork 0
172 lines (150 loc) · 4.72 KB
/
release.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: Release
on:
release:
types: [created]
jobs:
get-release:
runs-on: ubuntu-latest
steps:
- name: Get Release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Dump upload url to file
run: echo '${{ steps.get_release.outputs.upload_url }}' > upload_url
- name: Upload upload_url
uses: actions/upload-artifact@v3
with:
name: upload_url
path: upload_url
build:
needs: get-release
runs-on: ubuntu-latest
steps:
- name: Download upload_url
uses: actions/download-artifact@v3
with:
name: upload_url
path: upload_url
- name: Set upload_url
run: echo "UPLOAD_URL=$(cat upload_url/upload_url)" >> $GITHUB_ENV
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
path: './build'
- name: Make packaging script executable
run: chmod +x ./build/package.sh
- uses: uraimo/run-on-arch-action@v2
name: Build on ubuntu-20.04 aarch64
id: runcmd
with:
arch: aarch64
distro: ubuntu20.04
setup: |
echo "."
echo ".."
echo "run-on-arch setup"
mkdir -p "${PWD}/build"
python3 --version
# Mount the build directory as /build in the container
dockerRunArgs: |
--volume "${PWD}/build:/build"
#--volume "${PWD}/package:/package"
# Pass some environment variables to the container
#env: | # YAML, but pipe character is necessary
#artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}
# Not required, but speeds up builds by storing container images in
# a GitHub package registry. Make sure there are no secrets in the disk image!
#githubToken: ${{ github.token }}
shell: /bin/bash
install: |
echo "."
echo "INSTALL"
run: |
echo "."
echo ".."
echo "RUN"
uname -a
echo
pwd
echo
ls
echo
ls /
cd build
export DEBIAN_FRONTEND=noninteractive
apt update
apt install software-properties-common -y
add-apt-repository universe -y
add-apt-repository 'ppa:deadsnakes/ppa' -y
apt update
echo ""
apt install -y -v \
python3.11 \
python3-pip \
python3-dbus \
python3-wheel \
python3.11-dev \
libpython3.11-dev
echo "Python3 version after install:"
python3 --version
apt install -y python3-distutils-extra
apt-get update -q
echo "."
echo ".."
echo "..."
echo "Installing lots of stuff"
apt install -y -v \
wget \
autoconf \
automake \
build-essential \
ca-certificates \
curl \
git \
libbz2-dev \
libc6-dev \
libffi-dev \
libgdbm-dev \
libjpeg-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libncurses5-dev \
libncursesw5-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libudev-dev \
pkg-config \
zlib1g-dev \
libjpeg-dev \
libpango1.0-dev \
libgif-dev \
software-properties-common \
sudo \
openssl
echo ""
echo "."
echo "Attempting libcairo install"
apt install -y pkg-config python3.11-dev libpython3.11-dev
apt install -y libcairo2-dev
chmod +x package.sh
ADDON_ARCH=linux-arm64 ./package.sh
- name: List after container
run: |
ls -lh
shell: bash
- name: Upload Release Asset tgz
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: build/matter-adapter-${{ env.RELEASE_VERSION }}-linux-arm64-v3.11.tgz
- name: Upload Release Asset shasum
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: build/matter-adapter-${{ env.RELEASE_VERSION }}-linux-arm64-v3.11.tgz.sha256sum