-
Notifications
You must be signed in to change notification settings - Fork 171
124 lines (123 loc) · 4 KB
/
daily_build.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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 }}