-
Notifications
You must be signed in to change notification settings - Fork 18
74 lines (70 loc) · 2.75 KB
/
beta-build.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
# Copyright (C) 2021 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
name: Beta snap build
on:
# Run whenever a new revision is pushed to the beta branch.
#push:
# branches:
# - beta
# Allow running manually, for testing purposes.
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
beta-snap:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: beta
- name: Extract current version
id: extract-current-version
run: ./.github/scripts/extract-current-version.sh
- name: Install wget
run: sudo apt update && sudo apt install wget
- name: Check whether the source tarball and XPIs are available
run: |
version=${{ env.current_version }}
build=$(echo $version | cut -d- -f2)
version=$(echo $version | cut -d- -f1)
checksums=https://ftp.mozilla.org/pub/firefox/candidates/$version-candidates/build$build/SHA512SUMS
until wget -S --spider $checksums; do sleep 3m; done
timeout-minutes: 180
- uses: snapcore/action-build@v1
id: build-new-snap-beta
- uses: snapcore/action-publish@v1
with:
store_login: ${{ secrets.SNAPSTORE_LOGIN }}
snap: ${{ steps.build-new-snap-beta.outputs.snap }}
release: beta
- name: Install the marionette driver
run: |
sudo apt update && sudo apt install python3-pip
pip3 install marionette_driver
- name: Create missing user runtime directory
run: |
sudo mkdir -p /run/user/$UID
sudo chown $USER /run/user/$UID
- name: Install the snap from the store and run some basic tests
run: |
sudo snap install firefox --beta
channel=$(snap info firefox | grep tracking: | cut -d: -f2 | xargs)
[ $channel = "latest/beta" ]
installed=$(snap info firefox | grep installed: | cut -d: -f2 | xargs | cut -d' ' -f1)
[ $installed = ${{ env.current_version }} ]
runtimeversion=$(snap run firefox --version)
snap run firefox --headless --marionette &
pid=$!
./.github/scripts/firefox-basic-tests.py $pid "$runtimeversion"