Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
TianSky719 authored May 4, 2024
1 parent 6e2d575 commit 9905f53
Showing 1 changed file with 122 additions and 60 deletions.
182 changes: 122 additions & 60 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,125 @@
name: build

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
build_type: [Release]
enable_ui: [on]
include:
- os: windows-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'
with:
key: ${{ matrix.os }}-${{ matrix.enable_ui }}
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: ilammy/msvc-dev-cmd@v1
if: runner.os == 'Windows'
- 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
else
export enable_ccache=on
fi
curl -L https://github.com/blueloveTH/aseprite/releases/download/v0.01/skia.zip --output skia.zip
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=./skia/out/Release-x64 \
-DSKIA_LIBRARY=./skia/out/Release-x64/skia.lib
- name: Compiling
shell: bash
run: |
cd build && ninja
- uses: actions/upload-artifact@v3
with:
name: aseprite
path: |
D:/a/aseprite/aseprite/build/bin/data
D:/a/aseprite/aseprite/build/bin/aseprite.exe

  build:

    runs-on: ${{ matrix.os }}

    strategy:

      fail-fast: false

      matrix:

        os: [windows-latest]

        build_type: [Release]

        enable_ui: [on]

        include:

          - os: windows-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'

      with:

        key: ${{ matrix.os }}-${{ matrix.enable_ui }}

    - uses: seanmiddleditch/gha-setup-ninja@master

    - uses: ilammy/msvc-dev-cmd@v1

      if: runner.os == 'Windows'

    - 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

        else

          export enable_ccache=on

        fi

        curl -L https://github.com/blueloveTH/aseprite/releases/download/v0.01/skia.zip --output skia.zip

        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=./skia/out/Release-x64 \

          -DSKIA_LIBRARY=./skia/out/Release-x64/skia.lib

    - name: Compiling

      shell: bash

      run: |
        cd build && ninja

    - uses: actions/upload-artifact@v3

      with:

        name: aseprite

        path: |
          D:/a/aseprite/aseprite/build/bin/data

          D:/a/aseprite/aseprite/build/bin/aseprite.exe

0 comments on commit 9905f53

Please sign in to comment.