daily-build-workflow #1516
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-workflow | |
on: | |
schedule: | |
# UTCで記述する事、この場合は日本時間 9 時にしたいので -9 して 0 にしてある | |
- cron: "0 0 * * *" | |
# 明示的な branch の指定はできず、デフォルト branch の latest commit に対して実行される | |
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#onschedule | |
jobs: | |
build-windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- x86_64 | |
name: Build momo for Windows_${{ matrix.arch }} | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: microsoft/[email protected] | |
- name: Get Versions | |
run: | | |
Get-Content "VERSION" | Foreach-Object { | |
if (!$_) { continue } | |
$var = $_.Split('=') | |
New-Variable -Name $var[0] -Value $var[1] -Force | |
} | |
echo "boost_version=${BOOST_VERSION}" >> ${Env:GITHUB_OUTPUT} | |
echo "wincuda_version=${WINCUDA_VERSION}" >> ${Env:GITHUB_OUTPUT} | |
id: versions | |
- name: Cache Boost ${{ steps.versions.outputs.boost_version }} | |
id: cache-boost | |
uses: actions/cache@v3 | |
with: | |
path: _cache\boost | |
key: windows-boost-${{ steps.versions.outputs.boost_version }}.zip.v5 | |
- name: Cache NVCC ${{ steps.versions.outputs.wincuda_version }} | |
id: cache-cuda | |
uses: actions/cache@v3 | |
with: | |
path: build\windows_x86_64\_install\cuda\nvcc | |
key: windows-cuda-${{ steps.versions.outputs.wincuda_version }}.v1 | |
- run: "& .\\build.ps1 -package" | |
working-directory: build | |
timeout-minutes: 120 | |
build-macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- arm64 | |
name: Build momo for macOS_${{ matrix.arch }} | |
runs-on: macos-11.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Versions | |
run: | | |
source VERSION | |
echo "boost_version=${BOOST_VERSION}" >> $GITHUB_OUTPUT | |
id: versions | |
- name: Cache Boost ${{ steps.versions.outputs.boost_version }} | |
id: cache-boost | |
uses: actions/cache@v3 | |
with: | |
path: _cache/boost | |
key: macos-boost-${{ steps.versions.outputs.boost_version }}.tar.gz.v2 | |
- run: ./build.sh macos_${{ matrix.arch }} | |
working-directory: build | |
timeout-minutes: 120 | |
build-linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- raspberry-pi-os_armv6 | |
- raspberry-pi-os_armv7 | |
- raspberry-pi-os_armv8 | |
- ubuntu-20.04_x86_64 | |
- ubuntu-20.04_armv8_jetson_xavier | |
- ubuntu-22.04_x86_64 | |
name: Build momo for ${{ matrix.name }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Disk Cleanup | |
run: | | |
set -x | |
docker system df | |
docker rmi `docker images -q -a` | |
docker system df | |
- name: Get Versions | |
run: | | |
source VERSION | |
echo "boost_version=${BOOST_VERSION}" >> $GITHUB_OUTPUT | |
id: versions | |
- name: Cache Boost ${{ steps.versions.outputs.boost_version }} | |
id: cache-boost | |
uses: actions/cache@v3 | |
with: | |
path: _cache/boost | |
key: ${{ matrix.name }}-boost-${{ steps.versions.outputs.boost_version }}.tar.gz.v2 | |
- run: ./build.sh --no-tty --no-mount ${{ matrix.name }} | |
working-directory: build | |
timeout-minutes: 120 | |
notification: | |
name: Slack Notification | |
runs-on: ubuntu-latest | |
needs: | |
- build-windows | |
- build-macos | |
- build-linux | |
if: always() | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: rtCamp/action-slack-notify@v2 | |
if: | | |
needs.build-windows.result == 'failure' || | |
needs.build-macos.result == 'failure' || | |
needs.build-linux.result == 'failure' | |
env: | |
SLACK_CHANNEL: open-momo | |
SLACK_COLOR: danger | |
SLACK_TITLE: Failure build | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |