Merge pull request #53 from shiguredo-webrtc-build/feature/fix-m117.5938 #995
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
- 'LICENSE' | |
- 'NOTICE' | |
- '.gitignore' | |
branches-ignore: | |
- daily | |
tags: | |
- '*' | |
jobs: | |
build-windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- windows_x86_64 | |
- windows_arm64 | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Disk Cleanup | |
run: | | |
Get-PSDrive | |
# Cache 済み Docker Image の削除 | |
docker rmi $(docker images -q -a) | |
# Android SDK の削除 | |
if ($Env:ANDROID_HOME) { | |
Remove-Item -Recurse -Force $Env:ANDROID_HOME -ErrorAction Ignore | |
} | |
if ($Env:ANDROID_NDK_HOME) { | |
Remove-Item -Recurse -Force $Env:ANDROID_NDK_HOME -ErrorAction Ignore | |
} | |
# JVM の削除 | |
if ($Env:JAVA_HOME_11_X64) { | |
Remove-Item -Recurse -Force $Env:JAVA_HOME_11_X64 -ErrorAction Ignore | |
} | |
if ($Env:JAVA_HOME_8_X64) { | |
Remove-Item -Recurse -Force $Env:JAVA_HOME_8_X64 -ErrorAction Ignore | |
} | |
Get-PSDrive | |
- name: Build ${{ matrix.name }} | |
run: | | |
# リポジトリの下に置きたいが、GitHub Actions の D:\ の容量が少なくてビルド出来ない問題があるので | |
# このパスにソースを配置する。 | |
# また、WebRTC のビルドしたファイルは同じドライブに無いといけないっぽいのでこちらも設定する。 | |
python3 run.py build ${{ matrix.name }} --source-dir 'C:\webrtc' --build-dir 'C:\webrtc-build' | |
python3 run.py package ${{ matrix.name }} --source-dir 'C:\webrtc' --build-dir 'C:\webrtc-build' | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: webrtc.${{ matrix.name }}.zip | |
path: _package/${{ matrix.name }}/webrtc.${{ matrix.name }}.zip | |
build-macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- macos_arm64 | |
- ios | |
runs-on: macOS-11.0 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Select Xcode 13.0 | |
run: sudo xcode-select --switch /Applications/Xcode_13.0.app/Contents/Developer | |
- run: brew install ninja | |
- name: Build ${{ matrix.name }} for macos | |
if: matrix.name == 'macos_arm64' | |
run: | | |
python3 run.py build ${{ matrix.name }} | |
python3 run.py package ${{ matrix.name }} | |
- name: Build ${{ matrix.name }} for ios | |
if: matrix.name == 'ios' | |
run: | | |
python3 run.py build ${{ matrix.name }} --webrtc-overlap-ios-build-dir | |
python3 run.py package ${{ matrix.name }} --webrtc-overlap-ios-build-dir | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: webrtc.${{ matrix.name }}.tar.gz | |
path: _package/${{ matrix.name }}/webrtc.${{ matrix.name }}.tar.gz | |
build-linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- raspberry-pi-os_armv6 | |
- raspberry-pi-os_armv7 | |
- raspberry-pi-os_armv8 | |
- ubuntu-18.04_armv8 | |
- ubuntu-20.04_armv8 | |
- ubuntu-20.04_x86_64 | |
- ubuntu-22.04_x86_64 | |
- android | |
runs-on: ${{ matrix.name == 'ubuntu-22.04_x86_64' && 'ubuntu-22.04' || 'ubuntu-20.04' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Disk Cleanup | |
run: | | |
set -x | |
df -h | |
sudo du -h -d1 /usr/local | |
sudo du -h -d1 /usr/local/share | |
sudo du -h -d1 /usr/local/lib | |
sudo du -h -d1 /usr/share | |
docker rmi `docker images -q -a` | |
# 4.6G | |
sudo rm -rf /usr/local/.ghcup | |
# 1.7G | |
sudo rm -rf /usr/share/swift | |
# 1.4G | |
sudo rm -rf /usr/share/dotnet | |
# 13G | |
sudo rm -rf /usr/local/lib/android | |
df -h | |
- name: Setup ${{ matrix.name }} for x86_64 | |
if: endsWith(matrix.name, '_x86_64') | |
run: sudo scripts/apt_install_x86_64.sh | |
- name: Setup ${{ matrix.name }} for arm | |
if: contains(matrix.name, '_armv') | |
run: sudo scripts/apt_install_arm.sh | |
- name: Setup ${{ matrix.name }} for android | |
if: matrix.name == 'android' | |
run: sudo scripts/apt_install_x86_64.sh && sudo apt-get install -y openjdk-11-jdk | |
- name: Build ${{ matrix.name }} | |
run: | | |
python3 run.py build ${{ matrix.name }} | |
python3 run.py package ${{ matrix.name }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: webrtc.${{ matrix.name }}.tar.gz | |
path: _package/${{ matrix.name }}/webrtc.${{ matrix.name }}.tar.gz | |
create-release: | |
name: Create Release | |
if: contains(github.ref, 'tags/m') | |
needs: | |
- build-windows | |
- build-macos | |
- build-linux | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/download | |
with: | |
platform: windows_x86_64 | |
- uses: ./.github/actions/download | |
with: | |
platform: windows_arm64 | |
- uses: ./.github/actions/download | |
with: | |
platform: macos_arm64 | |
- uses: ./.github/actions/download | |
with: | |
platform: ios | |
- uses: ./.github/actions/download | |
with: | |
platform: raspberry-pi-os_armv6 | |
- uses: ./.github/actions/download | |
with: | |
platform: raspberry-pi-os_armv7 | |
- uses: ./.github/actions/download | |
with: | |
platform: raspberry-pi-os_armv8 | |
- uses: ./.github/actions/download | |
with: | |
platform: ubuntu-18.04_armv8 | |
- uses: ./.github/actions/download | |
with: | |
platform: ubuntu-20.04_armv8 | |
- uses: ./.github/actions/download | |
with: | |
platform: ubuntu-20.04_x86_64 | |
- uses: ./.github/actions/download | |
with: | |
platform: ubuntu-22.04_x86_64 | |
- uses: ./.github/actions/download | |
with: | |
platform: android | |
- name: Env to output | |
run: | | |
echo "package_paths<<EOF" >> $GITHUB_OUTPUT | |
cat package_paths.env >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
id: env | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | |
${{ steps.env.outputs.package_paths }} |