daily build #1326
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: daily build | |
on: | |
schedule: | |
# 毎日 09:00 JST | |
- cron: "0 0 * * *" | |
jobs: | |
build-windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- windows_x86_64 | |
- windows_arm64 | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: daily | |
- 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 | |
- run: Copy-Item VERSION.head VERSION | |
- 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.zip | |
build-macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- macos_arm64 | |
- ios | |
runs-on: macOS-11.0 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: daily | |
- run: cp VERSION.head VERSION | |
- 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.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 | |
with: | |
ref: daily | |
- 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 | |
- run: cp VERSION.head VERSION | |
- 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.tar.gz |