-
Notifications
You must be signed in to change notification settings - Fork 10
76 lines (63 loc) · 2.59 KB
/
build_docker_linux.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
# This workflow will create a release and build multiple versions of the webrtc library.
name: build_docker_linux
on:
push:
branches: [update-webrtc]
workflow_dispatch:
inputs:
fail_fast:
description: "Should stop the workflow as soon as one configuration fails"
required: false
type: boolean
default: false
jobs:
build-linux:
strategy:
fail-fast: ${{ github.event.inputs.fail_fast != 'false'}}
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
architecture: [arm64, amd64]
build-type: [Release, Debug]
runs-on: ubuntu-22.04
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 30000
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Generate Version Output
id: generate_version_output
run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
shell: bash
- name: Print Version Information
run: echo "Version ${{ steps.generate_version_output.outputs.version }}"
shell: bash
- name: Generate Release File Name
id: generate_release_file_name
run: |
echo "release_file_name=webrtc-native-build-${{ matrix.os }}-\
${{ matrix.architecture }}-\
${{ matrix.build-type }}-\
${{ steps.generate_version_output.outputs.version }}" >> $GITHUB_OUTPUT
- name: Generate Branch Name
id: generate_branch_name
run: |
echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
- name: Print Release File Name
run: echo "Release File Name ${{ steps.generate_release_file_name.outputs.release_file_name }} on branch ${{ steps.generate_branch_name.outputs.branch_name }}"
shell: bash
- name: Create and run Docker Image
working-directory: ./docker/${{ matrix.os }}
run: |
docker buildx build -t webrtc --build-arg BUILD_TYPE=${{ matrix.build-type }} --build-arg BUILD_ARCHITECTURE=${{ matrix.architecture }} --build-arg BUILD_BRANCH=${{ steps.generate_branch_name.outputs.branch_name }} .
docker run --rm --volume $PWD:/data webrtc tar cvzf /data/${{ steps.generate_release_file_name.outputs.release_file_name }}.tar.gz ./webrtc-native-build-${{ steps.generate_version_output.outputs.version }}
ls -l
shell: bash