-
Notifications
You must be signed in to change notification settings - Fork 45
executable file
·71 lines (60 loc) · 2.59 KB
/
build_x86_64.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
# This is a basic workflow to help you get started with Actions
name: Compile x86_64
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
env:
ANDROID_ABI: x86_64
OPENSSL_VERSION: 3.3.0
ANDROID_NDK_VERSION: r20b
WORK_PATH: /home/runner/work/openssl_for_android/openssl_for_android
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Compile_OpenSSL_for_Android_x86_64:
name: Compile x86_64
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $env.WORK_PATH, so your job can access it
- uses: actions/checkout@main
- name: Install aria2
run: |
sudo apt -yqq update
sudo apt install -yqq aria2
- name: Download Android NDK
id: download_ndk
run: |
aria2c https://dl.google.com/android/repository/android-ndk-${{env.ANDROID_NDK_VERSION}}-linux-x86_64.zip
unzip android-ndk-${{env.ANDROID_NDK_VERSION}}-linux-x86_64.zip
echo "::set-output name=status::success"
- name: Download OpenSSL
id: download_openssl
run: |
aria2c https://www.openssl.org/source/openssl-${{env.OPENSSL_VERSION}}.tar.gz
tar -zxvf openssl-${{env.OPENSSL_VERSION}}.tar.gz
echo "::set-output name=status::success"
- name: Compile
id: compile
if: steps.download_ndk.outputs.status == 'success' && steps.download_openssl.outputs.status == 'success' && !cancelled()
run: |
mkdir build
bash ./openssl_build_${{env.ANDROID_ABI}}.sh
echo "::set-output name=status::success"
- name: Generate release tag
id: tag
run: |
tar -zcvf OpenSSL_${{env.OPENSSL_VERSION}}_${{env.ANDROID_ABI}}.tar.gz openssl_${{env.OPENSSL_VERSION}}_${{env.ANDROID_ABI}}
echo "::set-output name=release_tag::${{env.OPENSSL_VERSION}}"
echo "::set-output name=status::success"
- name: Upload firmware to release
if: steps.tag.outputs.status == 'success' && !cancelled()
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.release_tag }}
files: ${{env.WORK_PATH}}/OpenSSL_${{env.OPENSSL_VERSION}}_${{env.ANDROID_ABI}}.tar.gz