Skip to content

Commit

Permalink
Merge branch 'release/2024.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
miosakuma committed Mar 4, 2024
2 parents 5213d43 + 8e1f111 commit 688d308
Show file tree
Hide file tree
Showing 42 changed files with 2,091 additions and 1,355 deletions.
71 changes: 55 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ jobs:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v1.3
- uses: microsoft/setup-msbuild@v2
- name: Env to output
run: |
echo "userprofile=${Env:USERPROFILE}" >> ${Env:GITHUB_OUTPUT}
echo "username=${Env:USERNAME}" >> ${Env:GITHUB_OUTPUT}
id: env
- name: Bazel cache (cache)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "${{ steps.env.outputs.userprofile }}/_bazel_${{ steps.env.outputs.username }}/cache"
key: bazel-cache-${{ matrix.name }}-v1
- name: Bazel cache (install)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "${{ steps.env.outputs.userprofile }}/_bazel_${{ steps.env.outputs.username }}/install"
key: bazel-install-${{ matrix.name }}-v1
Expand All @@ -47,11 +47,11 @@ jobs:
# CUDA のインストールバイナリのダウンロードは 3GB ぐらいあって、
# ビルドの度に取得するのはつらいのでキャッシュする
# (インストールする nvcc は解凍後で 100MB 程度なのでキャッシュ可能)
- name: Cache NVCC ${{ steps.versions.outputs.cuda_version }}
- name: Cache CUDA ${{ steps.versions.outputs.cuda_version }}
id: cache-cuda
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: _install\windows_x86_64\release\cuda\nvcc
path: _install\windows_x86_64\release\cuda
key: windows-cuda-${{ steps.versions.outputs.cuda_version }}.v1
- run: echo "${CUDA_VERSION}" > _install\windows_x86_64\release\cuda.version
if: steps.cache-cuda.outputs.cache-hit == 'true'
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
echo "user=`users`" >> $GITHUB_OUTPUT
id: env
- name: Bazel cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "/private/var/tmp/_bazel_${{ steps.env.outputs.user }}"
key: bazel-${{ matrix.name }}-v2
Expand Down Expand Up @@ -155,27 +155,42 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Bazel cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: bazel-${{ matrix.name }}-v1
- 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
df -h
- name: Install deps for ${{ matrix.name }}
if: matrix.name == 'ubuntu-20.04_x86_64' || matrix.name == 'ubuntu-22.04_x86_64'
run: |
source VERSION
# clang-15 と CUDA を入れる
# clang-18 と CUDA を入れる
sudo apt-get update
sudo apt-get install -y software-properties-common
# CUDA 10 なので ubuntu1804 で正しい
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_*all.deb
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get -y install cuda=$CUDA_VERSION
wget https://apt.llvm.org/llvm.sh
chmod a+x llvm.sh
sudo ./llvm.sh 15
sudo ./llvm.sh 18
# Intel Media SDK のために libva-dev, libdrm-dev を入れる
DEBIAN_FRONTEND=noninteractive sudo apt-get -y install libva-dev libdrm-dev
Expand All @@ -192,8 +207,15 @@ jobs:
if: matrix.name == 'android'
run: |
sudo apt-get -y install ninja-build
# JDK を指定しないとデフォルトの JDK 11 で動作するため指定する
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
if: matrix.name == 'android'
- name: Setup Android SDK
uses: android-actions/setup-android@v2.0.10
uses: android-actions/setup-android@v3
if: matrix.name == 'android'
- run: pip3 install numpy
- run: python3 run.py --test --package ${{ matrix.name }}
Expand Down Expand Up @@ -224,6 +246,15 @@ jobs:
with:
name: ${{ matrix.name }}.env
path: _package/${{ matrix.name }}/release/sora.env
- name: Slack Notification
if: failure()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: sora-cpp-sdk
SLACK_COLOR: danger
SLACK_TITLE: Build failed
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

create-release:
name: Create Release
if: contains(github.ref, 'tags/202')
Expand Down Expand Up @@ -265,3 +296,11 @@ jobs:
uses: softprops/action-gh-release@v1
with:
files: ${{ steps.env.outputs.package_paths }}
- name: Slack Notification
if: failure()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: sora-cpp-sdk
SLACK_COLOR: danger
SLACK_TITLE: Release failed
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["charliermarsh.ruff", "ms-python.mypy-type-checker"]
}
Loading

0 comments on commit 688d308

Please sign in to comment.