137 lines
4.2 KiB
YAML
137 lines
4.2 KiB
YAML
name: WebRTC builds
|
|
on: workflow_dispatch
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target:
|
|
- name: win
|
|
os: windows-latest
|
|
cmd: .\build_windows.cmd
|
|
arch: x64
|
|
|
|
- name: win
|
|
os: windows-latest
|
|
cmd: .\build_windows.cmd
|
|
arch: arm64
|
|
|
|
- name: mac
|
|
os: macos-latest
|
|
cmd: ./build_macos.sh
|
|
arch: x64
|
|
|
|
- name: mac
|
|
os: macos-latest
|
|
cmd: ./build_macos.sh
|
|
arch: arm64
|
|
|
|
- name: linux
|
|
os: ubuntu-latest
|
|
cmd: ./build_linux.sh
|
|
arch: x64
|
|
|
|
- name: linux
|
|
os: ubuntu-latest
|
|
cmd: ./build_linux.sh
|
|
arch: arm64
|
|
|
|
- name: android
|
|
os: ubuntu-latest
|
|
cmd: ./build_android.sh
|
|
arch: arm64
|
|
|
|
- name: android
|
|
os: ubuntu-latest
|
|
cmd: ./build_android.sh
|
|
arch: arm
|
|
|
|
- name: android
|
|
os: ubuntu-latest
|
|
cmd: ./build_android.sh
|
|
arch: x64
|
|
|
|
- name: ios
|
|
out: ios-device-arm64
|
|
os: macos-latest
|
|
cmd: ./build_ios.sh
|
|
arch: arm64
|
|
|
|
- name: ios
|
|
out: ios-simulator-arm64
|
|
os: macos-latest
|
|
cmd: ./build_ios.sh
|
|
arch: arm64
|
|
buildargs: --environment simulator
|
|
profile:
|
|
- release
|
|
- debug
|
|
|
|
name: Build webrtc (${{ matrix.target.name }}-${{ matrix.target.arch }}-${{ matrix.profile }}) ${{ matrix.target.buildargs }}
|
|
runs-on: ${{ matrix.target.os }}
|
|
steps:
|
|
- name: Setup variables
|
|
id: setup
|
|
run: |
|
|
DEFAULT_OUT=${{ matrix.target.name }}-${{ matrix.target.arch }}
|
|
OUT=${{ matrix.target.out == '' && '$DEFAULT_OUT' || matrix.target.out }}-${{ matrix.profile }}
|
|
echo OUT=$OUT >> $GITHUB_OUTPUT
|
|
echo ZIP=webrtc-$OUT.zip >> $GITHUB_OUTPUT
|
|
shell: bash
|
|
|
|
# Print some debug infos to be sure everything is ok before doing really long tasks..
|
|
- name: Info
|
|
run: |
|
|
echo "OutName: ${{ steps.setup.outputs.OUT }}"
|
|
echo "OutZip: ${{ steps.setup.outputs.ZIP }}"
|
|
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Install linux dependencies
|
|
if: ${{ matrix.target.os == 'ubuntu-latest' }}
|
|
run: sudo apt install -y ninja-build pkg-config openjdk-11-jdk
|
|
|
|
- name: Install macos dependencies
|
|
if: ${{ matrix.target.os == 'macos-latest' }}
|
|
run: brew install ninja
|
|
|
|
# It doesn't seem to be used?
|
|
- name: Install windows dependencies
|
|
if: ${{ matrix.target.os == 'windows-latest' }}
|
|
run: |
|
|
Invoke-WebRequest -Uri "https://github.com/ninja-build/ninja/releases/latest/download/ninja-win.zip" -OutFile ninja.zip
|
|
Expand-Archive -Path ninja.zip -DestinationPath ninja
|
|
echo "${{ github.workspace }}\ninja" >> $GITHUB_PATH
|
|
|
|
- name: Print ninja version
|
|
run: ninja --version
|
|
|
|
- name: Target OS
|
|
run: echo -e "\ntarget_os = [\"${{ matrix.target.name }}\"]" >> .gclient
|
|
shell: bash
|
|
working-directory: webrtc-sys/libwebrtc
|
|
|
|
- name: Build WebRTC
|
|
run: ${{ matrix.target.cmd }} --arch ${{ matrix.target.arch }} --profile ${{ matrix.profile }} ${{ matrix.target.buildargs }}
|
|
working-directory: webrtc-sys/libwebrtc
|
|
|
|
- name: Zip artifact (Unix)
|
|
if: ${{ matrix.target.os != 'windows-latest' }}
|
|
run: |
|
|
cd webrtc-sys/libwebrtc/${{ steps.setup.outputs.OUT }}
|
|
zip ${{ github.workspace }}/${{ steps.setup.outputs.ZIP }} ./* -r
|
|
|
|
- name: Zip artifact (Windows)
|
|
if: ${{ matrix.target.os == 'windows-latest' }}
|
|
run: Compress-Archive -Path .\webrtc-sys\libwebrtc\${{ steps.setup.outputs.OUT }}\* -DestinationPath ${{ steps.setup.outputs.ZIP }}
|
|
|
|
# doublezip here but I don't think there is an alternative
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ steps.setup.outputs.ZIP }}
|
|
path: ${{ steps.setup.outputs.ZIP }}
|