-
Notifications
You must be signed in to change notification settings - Fork 53
106 lines (93 loc) · 3.06 KB
/
generate_swig.yml
File metadata and controls
106 lines (93 loc) · 3.06 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
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
# Workflow to generate the SWIG files on linux
name: Generate SWIG files
on:
workflow_dispatch:
inputs:
unity_version:
description: 'Unity version'
default: '2021'
required: true
type: string
firebase_cpp_sdk_version:
description: 'Firebase CPP SDK version to build against (The branch, tag or SHA to checkout)'
default: ''
required: false
type: string
apis:
description: 'CSV of apis to build and test'
default: 'analytics,app_check,auth,crashlytics,database,firebaseai,firestore,functions,installations,messaging,remote_config,storage'
required: true
type: string
# Additional CMake flags to use
additional_cmake_flags:
description: 'Additional flags to pass into CMake'
default: ''
required: false
type: string
permissions: write-all
jobs:
generate_swig:
name: generate-swig-unity${{inputs.unity_version}}-CPP${{ inputs.firebase_cpp_sdk_version }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.31.0"
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/checkout@v3
with:
repository: firebase/firebase-cpp-sdk
path: firebase-cpp-sdk
submodules: true
ref: ${{ inputs.firebase_cpp_sdk_version }}
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install prerequisites
shell: bash
run: |
echo "FIREBASE_CPP_SDK_DIR=${{ github.workspace }}/firebase-cpp-sdk" >> $GITHUB_ENV
cd firebase-cpp-sdk
python scripts/gha/install_prereqs_desktop.py
cd ..
- name: Install python deps
shell: bash
run: |
pip install -r scripts/gha/requirements.txt
- name: Install OpenSSL (Linux)
run: |
sudo apt install openssl
- name: Setup Swig Env
shell: bash
run: |
echo "$(swig -swiglib)" >> $GITHUB_PATH
swig -swiglib
echo "SWIG_DIR=$(swig -swiglib)" >> $GITHUB_ENV
- name: Build SDK (Linux)
timeout-minutes: 90
shell: bash
run: |
# TODO add handling cmake_extras
CLEAN_APIS=$(echo ${INPUTS_APIS} | tr -d "'" | tr -d "\"")
python scripts/build_scripts/build_zips.py --gha --platform=linux --apis=${CLEAN_APIS} --gen_swig_only
env:
INPUTS_APIS: ${{ inputs.apis }}
- name: Check zip files
shell: bash
run: |
if [ -f linux_unity/documentation_sources.zip ]; then
echo "documentation_sources zip created."
else
echo "Fail to create documentation_sources zip."
exit 1
fi
- name: Upload Documentation Sources
uses: actions/upload-artifact@v4
with:
name: documentation_sources
path: linux_unity/documentation_sources.zip