forked from GStreamer/cerbero
-
Notifications
You must be signed in to change notification settings - Fork 7
66 lines (65 loc) · 2.35 KB
/
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
name: Build and Deploy
on:
workflow_dispatch:
inputs:
upload_packages:
description: 'Upload packages'
required: true
type: choice
default: 'on-merge'
options:
- 'on-merge'
- 'dry-run'
- 'skip'
- 'yes'
pull_request:
types:
- opened
- synchronize
- reopened
- closed
branches:
- 'main'
jobs:
build:
if: ${{ (github.event_name == 'workflow_dispatch') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) }}
runs-on: self-hosted
strategy:
matrix:
target: [arm64, x86_64]
steps:
- name: Fetch source code
uses: actions/[email protected]
- name: Configure Cerbero
run: |
ANDROID_ARCH=${{ matrix.target }}
ANDROID_ARCH=${ANDROID_ARCH//_/-}
tee -a $GITHUB_ENV <<< "ANDROID_ARCH=$ANDROID_ARCH"
tee -a $GITHUB_ENV <<< "ANDROID_CONFIG=cross-android-$ANDROID_ARCH.cbc"
mkdir -p ~/.config/cerbero
tee ~/.config/cerbero/cerbero.cbc <<-EOF
use_ccache = True
home_dir = "$HOME/cerbero-build-$ANDROID_ARCH"
EOF
- name: Bootstrap Cerbero
run: |
./cerbero-uninstalled -c ./config/${ANDROID_CONFIG} bootstrap -y
- name: Package dependencies
run: |
./cerbero-uninstalled -c ./config/${ANDROID_CONFIG} package -f wpewebkit
- name: Store packages
uses: actions/upload-artifact@v4
with:
name: wpe-deps-${{ matrix.target }}
path: ./wpewebkit-android-${{ matrix.target }}*
if-no-files-found: error
- name: Upload packages to wpewebkit.org
if: ${{ inputs.upload_packages == 'yes' || inputs.upload_packages == 'dry-run' || (github.event.pull_request.merged == true && inputs.upload_packages == 'on-merge') }}
run: |
python3 ./.github/workflows/upload.py "./wpewebkit-android-${{ matrix.target }}*" || \
echo "**:warning: WARNING :warning:** Cannot upload ./wpewebkit-android-${{ matrix.target }}... files to wpewebkit.org" >> $GITHUB_STEP_SUMMARY
exit 0
env:
UPLOAD_DRY_RUN: ${{ inputs.upload_packages == 'dry-run' }}
UPLOAD_KEY_PASSWD: ${{ secrets.UPLOAD_KEY_PASSWD }}
UPLOAD_SSH_KNOWN_HOSTS: ${{ secrets.UPLOAD_SSH_KNOWN_HOSTS }}