build test #12
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: build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
build_type: [Release] | |
enable_ui: [on] | |
include: | |
- os: ubuntu-latest | |
build_type: Release | |
enable_ui: on | |
- os: windows-latest | |
build_type: Release | |
enable_ui: on | |
- os: macos-latest | |
build_type: Release | |
enable_ui: on | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: ccache | |
uses: hendrikmuhs/ccache-action@v1 | |
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }} | |
with: | |
key: ${{ matrix.os }}-${{ matrix.enable_ui }}-${{ matrix.build_type }} | |
- uses: aseprite/get-ninja@main | |
- uses: ilammy/msvc-dev-cmd@v1 | |
if: runner.os == 'Windows' | |
- name: Workaround for windows-2022 and cmake 3.25.0 | |
if: runner.os == 'Windows' | |
shell: bash | |
run: rm -rf C:/Strawberry/ | |
- name: Install Dependencies | |
shell: bash | |
run: | | |
if [[ "${{ runner.os }}" == "Linux" ]] ; then | |
sudo apt-get update -qq | |
sudo apt-get install -y \ | |
libx11-dev libxcursor-dev libxi-dev | |
fi | |
- name: Generating Makefiles | |
shell: bash | |
run: | | |
if [[ "${{ runner.os }}" == "Windows" ]] ; then | |
export enable_ccache=off | |
curl -L https://github.com/aseprite/skia/releases/download/m124-eadfe707ca/Skia-Windows-Release-x64.zip --output skia.zip | |
curl -L https://github.com/blueloveTH/aseprite/releases/download/v0.01/libcrypto-1_1-x64.dll --output libcrypto-1_1-x64.dll | |
7z x skia.zip | |
cmake -S . -B build -G Ninja \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DENABLE_UI=${{ matrix.enable_ui }} \ | |
-DENABLE_CCACHE=$enable_ccache \ | |
-DLAF_BACKEND=skia \ | |
-DSKIA_DIR=./skia \ | |
-DSKIA_LIBRARY_DIR=./out/Release-x64 \ | |
-DSKIA_LIBRARY=./out/Release-x64/skia.lib | |
elif [[ "${{ runner.os }}" == "Linux" ]] ; then | |
export enable_ccache=on | |
curl -L https://github.com/aseprite/skia/releases/download/m124-eadfe707ca/Skia-Linux-Release-x64.zip --output skia.zip | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DENABLE_UI=${{ matrix.enable_ui }} \ | |
-DENABLE_CCACHE=$enable_ccache \ | |
-DLAF_BACKEND=skia \ | |
-DSKIA_DIR=./skia \ | |
-DSKIA_LIBRARY_DIR=./out/Release-x64 \ | |
-DSKIA_LIBRARY=./out/Release-x64/libskia.a | |
elif [[ "${{ runner.os }}" == "macOS" ]] ; then | |
export enable_ccache=on | |
curl -L https://github.com/aseprite/skia/releases/download/m124-eadfe707ca/Skia-macOS-Release-x64.zip --output skia.zip | |
cmake -S . -B build -G Ninja \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DENABLE_UI=${{ matrix.enable_ui }} \ | |
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk | |
-DENABLE_CCACHE=$enable_ccache \ | |
-DLAF_BACKEND=skia \ | |
-DSKIA_DIR=./skia \ | |
-DSKIA_LIBRARY_DIR=./out/Release-x64 \ | |
-DSKIA_LIBRARY=./out/Release-x64/libskia.a \ | |
-G Ninja \ | |
.. ninja aseprite | |
fi | |
- name: Compiling | |
shell: bash | |
run: | | |
cd build && ninja | |
- uses: actions/upload-artifact@v3 | |
if: runner.os == 'Windows' | |
with: | |
name: aseprite-windows | |
path: | | |
libcrypto-1_1-x64.dll | |
D:/a/aseprite/aseprite/build/bin/data | |
D:/a/aseprite/aseprite/build/bin/aseprite.exe | |
- uses: actions/upload-artifact@v3 | |
if: runner.os == 'Linux' | |
with: | |
name: aseprite-ubuntu | |
path: | | |
./build/bin/data | |
./build/bin/aseprite |