Update dependencies #2963
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
on: | |
release: | |
types: [published] | |
push: | |
branches: | |
- master | |
- 15x | |
- 16x | |
- 16x_ex | |
- 17x | |
pull_request: | |
branches: | |
- master | |
- 15x | |
- 16x | |
- 16x_ex | |
- 17x | |
env: | |
EFFEKSEER_VERSION: 180Beta1 | |
jobs: | |
win_x86_build: | |
name: Build Windows(x86) | |
runs-on: windows-2019 | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- uses: actions/checkout@v2 | |
- run: | | |
git submodule update --init | |
git lfs install | |
git lfs pull | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Build | |
run: | | |
cmake -S . -B build -A Win32 -DBUILD_VIEWER=ON -D BUILD_TEST=ON -D BUILD_EXAMPLES=ON | |
cmake --build ./build/ --config Release | |
shell: cmd | |
tests: | |
name: Run Tests | |
runs-on: windows-2019 | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
architecture: 'x64' | |
- uses: actions/checkout@v2 | |
- run: | | |
git submodule update --init | |
git lfs install | |
git lfs pull | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Build | |
run: python build.py from_ci | |
shell: cmd | |
- name: Test | |
run: | | |
cd build/Dev/Cpp/Test/Release/ | |
TestCpp.exe | |
shell: cmd | |
- name: Upload Test | |
uses: actions/upload-artifact@v1 | |
with: | |
name: Test | |
path: build/Dev/Cpp/Test/Release/ | |
- name: Test | |
run: python Script/test_screenshot.py | |
shell: cmd | |
Build: | |
strategy: | |
fail-fast: true | |
matrix: | |
name: [linux,windows_x64,mac] | |
include: | |
- name: linux | |
os: ubuntu-20.04 | |
label: Linux | |
- name: windows_x64 | |
os: windows-2019 | |
label: Win | |
- name: mac | |
os: macos-11 | |
label: Mac | |
name: Build on ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
architecture: 'x64' | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
fetch-depth: 1 | |
- run: | | |
git lfs install | |
git lfs pull | |
- name: Install Cmake for macOS (because of libpng) | |
if: matrix.name == 'mac' | |
uses: jwlawson/actions-setup-cmake@v1.4 | |
with: | |
cmake-version: '3.18.x' | |
- name: Install Linux Dependencies | |
if: matrix.name == 'linux' | |
run: | | |
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg | |
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ | |
wget -q https://packages.microsoft.com/config/ubuntu/18.04/prod.list | |
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list | |
sudo apt-get update | |
sudo apt-get install -y libpulse-dev libglvnd-dev libx11-dev libopenal-dev libvulkan-dev \ | |
libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libgtk-3-dev ninja-build dotnet-sdk-3.1 \ | |
xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev zenity | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Build | |
shell: bash | |
run: | | |
if [ "${{ matrix.name }}" = "mac" ]; | |
then | |
export PACKAGEING_FOR_MAC=1 | |
sudo xcode-select --switch /Applications/Xcode_11.7.app | |
fi | |
python3 build.py || python build.py | |
- name: Prepare ForCpp | |
if: matrix.name == 'windows_x64' | |
run: | | |
release_cpp.bat | |
shell: cmd | |
- name: Prepare Windows Tool | |
run: | | |
release_tool.bat | |
if: matrix.name == 'windows_x64' | |
shell: cmd | |
- name: Prepare Linux Tool | |
run: | | |
bash ./release_tool.sh | |
if: matrix.name == 'linux' | |
- name: Upload ForCpp | |
if: matrix.name == 'windows_x64' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: EffekseerForCpp${{ env.EFFEKSEER_VERSION }} | |
path: EffekseerForCpp | |
- name: Upload ${{matrix.name}} Tool | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Effekseer${{ env.EFFEKSEER_VERSION }}${{matrix.label}} | |
path: EffekseerTool | |
Deploy: | |
needs: [tests,Build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: Effekseer${{ env.EFFEKSEER_VERSION }}Win | |
path: dist/ | |
- uses: actions/download-artifact@v2 | |
with: | |
name: Effekseer${{ env.EFFEKSEER_VERSION }}Linux | |
path: dist/ | |
- uses: actions/download-artifact@v2 | |
with: | |
name: EffekseerForCpp${{ env.EFFEKSEER_VERSION }} | |
path: dist/EffekseerForCpp | |
- uses: actions/download-artifact@v2 | |
with: | |
name: Effekseer${{ env.EFFEKSEER_VERSION }}Mac | |
path: dist/ | |
- name: Prepare Release | |
run: | | |
mkdir -p dist | |
mkdir -p pub | |
cd dist | |
for d in *; | |
do | |
if [ -d $d ]; | |
then | |
zip -r ../pub/$d.zip $d/* | |
else | |
cp $d ../pub/ | |
fi | |
done | |
- name: Upload Release artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: EffekseerReleaseAll | |
path: pub | |
- name: Deploy to Github Releases | |
if: github.event_name == 'release' | |
run: | | |
cd pub | |
releaseId=$(jq --raw-output '.release.id' ${GITHUB_EVENT_PATH}) | |
echo "Upload to release $releaseId" | |
for filename in *; | |
do | |
url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/$releaseId/assets?name=$(basename $filename)" | |
echo "Upload $filename to $url" | |
curl -L \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Content-Type: application/binary" \ | |
--data-binary @"$filename" \ | |
"$url" | |
done | |