2024-03-24 08:36:26 -05:00
|
|
|
name: lime-build
|
2020-11-11 23:21:35 -06:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "*" ]
|
|
|
|
tags: [ "*" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
2023-06-26 19:42:00 -05:00
|
|
|
source:
|
|
|
|
if: ${{ !github.head_ref }}
|
2020-11-11 23:21:35 -06:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-02-18 10:23:15 -06:00
|
|
|
- uses: actions/checkout@v4
|
2020-11-11 23:21:35 -06:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Pack
|
2023-06-26 19:42:00 -05:00
|
|
|
run: ./.ci/source.sh
|
2020-11-11 23:21:35 -06:00
|
|
|
- name: Upload
|
2024-02-18 10:23:15 -06:00
|
|
|
uses: actions/upload-artifact@v4
|
2020-11-11 23:21:35 -06:00
|
|
|
with:
|
2023-06-26 19:42:00 -05:00
|
|
|
name: source
|
2020-11-11 23:21:35 -06:00
|
|
|
path: artifacts/
|
2023-06-26 19:42:00 -05:00
|
|
|
linux:
|
2022-10-12 21:03:32 -05:00
|
|
|
runs-on: ubuntu-latest
|
2023-06-26 19:42:00 -05:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: ["appimage", "fresh"]
|
|
|
|
container:
|
2024-04-15 16:47:18 -05:00
|
|
|
image: opensauce04/lime3ds-build:latest
|
2023-06-26 19:42:00 -05:00
|
|
|
options: -u 1001
|
|
|
|
env:
|
|
|
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
2023-10-09 01:56:01 -05:00
|
|
|
CCACHE_COMPILERCHECK: content
|
2023-11-12 15:02:08 -06:00
|
|
|
CCACHE_SLOPPINESS: time_macros
|
2023-06-26 19:42:00 -05:00
|
|
|
OS: linux
|
|
|
|
TARGET: ${{ matrix.target }}
|
2022-10-12 21:03:32 -05:00
|
|
|
steps:
|
2024-02-18 10:23:15 -06:00
|
|
|
- uses: actions/checkout@v4
|
2022-10-12 21:03:32 -05:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2023-06-26 19:42:00 -05:00
|
|
|
- name: Set up cache
|
2024-02-18 10:23:15 -06:00
|
|
|
uses: actions/cache@v4
|
2023-06-26 19:42:00 -05:00
|
|
|
with:
|
|
|
|
path: ${{ env.CCACHE_DIR }}
|
|
|
|
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-${{ matrix.target }}-
|
|
|
|
- name: Build
|
|
|
|
run: ./.ci/linux.sh
|
2022-10-12 21:03:32 -05:00
|
|
|
- name: Pack
|
2023-06-26 19:42:00 -05:00
|
|
|
run: ./.ci/pack.sh
|
|
|
|
if: ${{ matrix.target == 'appimage' }}
|
2022-10-12 21:03:32 -05:00
|
|
|
- name: Upload
|
2024-02-18 10:23:15 -06:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-06-26 19:42:00 -05:00
|
|
|
if: ${{ matrix.target == 'appimage' }}
|
2022-10-12 21:03:32 -05:00
|
|
|
with:
|
2023-06-26 19:42:00 -05:00
|
|
|
name: ${{ env.OS }}-${{ env.TARGET }}
|
2022-10-12 21:03:32 -05:00
|
|
|
path: artifacts/
|
2020-11-11 23:21:35 -06:00
|
|
|
macos:
|
2024-02-01 08:39:29 -06:00
|
|
|
runs-on: ${{ (matrix.target == 'x86_64' && 'macos-13') || 'macos-14' }}
|
2023-03-01 11:58:09 -06:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-06-26 19:42:00 -05:00
|
|
|
target: ["x86_64", "arm64"]
|
|
|
|
env:
|
|
|
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
2023-10-09 01:56:01 -05:00
|
|
|
CCACHE_COMPILERCHECK: content
|
2023-11-12 15:02:08 -06:00
|
|
|
CCACHE_SLOPPINESS: time_macros
|
2023-06-26 19:42:00 -05:00
|
|
|
OS: macos
|
|
|
|
TARGET: ${{ matrix.target }}
|
2020-11-11 23:21:35 -06:00
|
|
|
steps:
|
2024-02-18 10:23:15 -06:00
|
|
|
- uses: actions/checkout@v4
|
2020-11-11 23:21:35 -06:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
2024-02-18 10:23:15 -06:00
|
|
|
uses: actions/cache@v4
|
2020-11-11 23:21:35 -06:00
|
|
|
with:
|
2023-06-26 19:42:00 -05:00
|
|
|
path: ${{ env.CCACHE_DIR }}
|
|
|
|
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}
|
2020-11-11 23:21:35 -06:00
|
|
|
restore-keys: |
|
2023-06-26 19:42:00 -05:00
|
|
|
${{ runner.os }}-${{ matrix.target }}-
|
2024-04-11 09:20:23 -05:00
|
|
|
- name: Setup XCode
|
|
|
|
uses: maxim-lobanov/setup-xcode@v1
|
|
|
|
with:
|
|
|
|
xcode-version: latest-stable
|
2023-06-26 19:42:00 -05:00
|
|
|
- name: Install tools
|
2024-04-04 07:19:53 -05:00
|
|
|
run: brew install ccache ninja spirv-tools
|
2020-11-11 23:21:35 -06:00
|
|
|
- name: Build
|
2023-06-26 19:42:00 -05:00
|
|
|
run: ./.ci/macos.sh
|
|
|
|
- name: Prepare outputs for caching
|
|
|
|
run: mv build/bundle $OS-$TARGET
|
|
|
|
- name: Cache outputs for universal build
|
2024-02-18 10:23:15 -06:00
|
|
|
uses: actions/cache/save@v4
|
2023-03-01 11:58:09 -06:00
|
|
|
with:
|
2023-06-26 19:42:00 -05:00
|
|
|
path: ${{ env.OS }}-${{ env.TARGET }}
|
|
|
|
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
|
2023-03-01 11:58:09 -06:00
|
|
|
macos-universal:
|
2024-02-01 08:39:29 -06:00
|
|
|
runs-on: macos-14
|
2023-03-01 11:58:09 -06:00
|
|
|
needs: macos
|
2023-06-26 19:42:00 -05:00
|
|
|
env:
|
|
|
|
OS: macos
|
|
|
|
TARGET: universal
|
2023-03-01 11:58:09 -06:00
|
|
|
steps:
|
2024-02-18 10:23:15 -06:00
|
|
|
- uses: actions/checkout@v4
|
2023-06-26 19:42:00 -05:00
|
|
|
- name: Download x86_64 build from cache
|
2024-02-18 10:23:15 -06:00
|
|
|
uses: actions/cache/restore@v4
|
2023-03-01 11:58:09 -06:00
|
|
|
with:
|
2023-06-26 19:42:00 -05:00
|
|
|
path: ${{ env.OS }}-x86_64
|
|
|
|
key: ${{ runner.os }}-x86_64-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
|
|
|
|
fail-on-cache-miss: true
|
|
|
|
- name: Download ARM64 build from cache
|
2024-02-18 10:23:15 -06:00
|
|
|
uses: actions/cache/restore@v4
|
2023-03-01 11:58:09 -06:00
|
|
|
with:
|
2023-06-26 19:42:00 -05:00
|
|
|
path: ${{ env.OS }}-arm64
|
|
|
|
key: ${{ runner.os }}-arm64-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
|
|
|
|
fail-on-cache-miss: true
|
2023-03-01 11:58:09 -06:00
|
|
|
- name: Create universal app
|
2023-06-26 19:42:00 -05:00
|
|
|
run: ./.ci/macos-universal.sh
|
2023-03-01 11:58:09 -06:00
|
|
|
env:
|
2023-06-26 19:42:00 -05:00
|
|
|
ARTIFACTS: ${{ env.OS }}-x86_64 ${{ env.OS }}-arm64
|
|
|
|
- name: Pack
|
|
|
|
run: ./.ci/pack.sh
|
2023-09-12 17:33:23 -05:00
|
|
|
- name: Upload
|
2024-02-18 10:23:15 -06:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-09-12 17:33:23 -05:00
|
|
|
with:
|
|
|
|
name: ${{ env.OS }}-${{ env.TARGET }}
|
|
|
|
path: artifacts/
|
2020-11-11 23:21:35 -06:00
|
|
|
windows:
|
|
|
|
runs-on: windows-latest
|
2023-06-26 19:42:00 -05:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-04-03 17:46:50 -05:00
|
|
|
target: ["msvc", "msys2"]
|
2023-06-26 19:42:00 -05:00
|
|
|
defaults:
|
|
|
|
run:
|
2024-04-03 17:46:50 -05:00
|
|
|
shell: ${{ (matrix.target == 'msys2' && 'msys2') || 'bash' }} {0}
|
2023-06-26 19:42:00 -05:00
|
|
|
env:
|
|
|
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
2023-10-09 01:56:01 -05:00
|
|
|
CCACHE_COMPILERCHECK: content
|
2023-11-12 15:02:08 -06:00
|
|
|
CCACHE_SLOPPINESS: time_macros
|
2023-06-26 19:42:00 -05:00
|
|
|
OS: windows
|
|
|
|
TARGET: ${{ matrix.target }}
|
2020-11-11 23:21:35 -06:00
|
|
|
steps:
|
2024-02-18 10:23:15 -06:00
|
|
|
- uses: actions/checkout@v4
|
2020-11-11 23:21:35 -06:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
2024-02-18 10:23:15 -06:00
|
|
|
uses: actions/cache@v4
|
2020-11-11 23:21:35 -06:00
|
|
|
with:
|
2023-06-26 19:42:00 -05:00
|
|
|
path: ${{ env.CCACHE_DIR }}
|
|
|
|
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}
|
2020-11-11 23:21:35 -06:00
|
|
|
restore-keys: |
|
2023-06-26 19:42:00 -05:00
|
|
|
${{ runner.os }}-${{ matrix.target }}-
|
2020-11-11 23:21:35 -06:00
|
|
|
- name: Set up MSVC
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
2024-04-03 17:46:50 -05:00
|
|
|
if: ${{ matrix.target == 'msvc' }}
|
2023-08-13 17:45:22 -05:00
|
|
|
- name: Install extra tools (MSVC)
|
2023-06-26 19:42:00 -05:00
|
|
|
run: choco install ccache ninja wget
|
2024-04-03 17:46:50 -05:00
|
|
|
if: ${{ matrix.target == 'msvc' }}
|
2024-04-11 09:43:20 -05:00
|
|
|
- name: Set up Vulkan SDK (MSVC)
|
|
|
|
uses: humbletim/setup-vulkan-sdk@v1.2.0
|
2024-04-04 07:19:53 -05:00
|
|
|
if: ${{ matrix.target == 'msvc' }}
|
2024-04-11 09:43:20 -05:00
|
|
|
with:
|
|
|
|
vulkan-query-version: latest
|
|
|
|
vulkan-components: SPIRV-Tools
|
|
|
|
vulkan-use-cache: true
|
2024-04-03 17:46:50 -05:00
|
|
|
- name: Set up MSYS2
|
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
if: ${{ matrix.target == 'msys2' }}
|
|
|
|
with:
|
|
|
|
msystem: clang64
|
|
|
|
update: true
|
|
|
|
install: git make p7zip
|
|
|
|
pacboy: >-
|
2024-04-04 07:19:53 -05:00
|
|
|
toolchain:p ccache:p cmake:p ninja:p spirv-tools:p
|
2024-04-03 17:46:50 -05:00
|
|
|
qt6-base:p qt6-multimedia:p qt6-multimedia-wmf:p qt6-tools:p qt6-translations:p
|
2023-07-04 23:02:33 -05:00
|
|
|
- name: Disable line ending translation
|
|
|
|
run: git config --global core.autocrlf input
|
2020-11-11 23:21:35 -06:00
|
|
|
- name: Build
|
2023-06-26 19:42:00 -05:00
|
|
|
run: ./.ci/windows.sh
|
2022-11-19 14:22:10 -06:00
|
|
|
- name: Pack
|
2023-06-26 19:42:00 -05:00
|
|
|
run: ./.ci/pack.sh
|
2022-11-19 14:22:10 -06:00
|
|
|
- name: Upload
|
2024-02-18 10:23:15 -06:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-11-19 14:22:10 -06:00
|
|
|
with:
|
2023-06-26 19:42:00 -05:00
|
|
|
name: ${{ env.OS }}-${{ env.TARGET }}
|
2022-11-19 14:22:10 -06:00
|
|
|
path: artifacts/
|
2022-04-04 13:18:33 -05:00
|
|
|
android:
|
|
|
|
runs-on: ubuntu-latest
|
2023-06-26 19:42:00 -05:00
|
|
|
env:
|
2023-10-09 01:56:01 -05:00
|
|
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
|
|
|
CCACHE_COMPILERCHECK: content
|
2023-11-12 15:02:08 -06:00
|
|
|
CCACHE_SLOPPINESS: time_macros
|
2023-06-26 19:42:00 -05:00
|
|
|
OS: android
|
|
|
|
TARGET: universal
|
2022-04-04 13:18:33 -05:00
|
|
|
steps:
|
2024-02-18 10:23:15 -06:00
|
|
|
- uses: actions/checkout@v4
|
2022-04-04 13:18:33 -05:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
2024-02-18 10:23:15 -06:00
|
|
|
uses: actions/cache@v4
|
2022-04-04 13:18:33 -05:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.gradle/caches
|
|
|
|
~/.gradle/wrapper
|
2023-10-09 01:56:01 -05:00
|
|
|
${{ env.CCACHE_DIR }}
|
2022-04-04 13:18:33 -05:00
|
|
|
key: ${{ runner.os }}-android-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-android-
|
2023-04-06 07:34:35 -05:00
|
|
|
- name: Set tag name
|
|
|
|
run: |
|
2024-04-02 08:26:03 -05:00
|
|
|
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
|
2023-04-06 07:34:35 -05:00
|
|
|
echo "GIT_TAG_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV
|
|
|
|
fi
|
|
|
|
echo $GIT_TAG_NAME
|
2022-04-04 13:18:33 -05:00
|
|
|
- name: Deps
|
|
|
|
run: |
|
2023-06-05 09:29:05 -05:00
|
|
|
sudo add-apt-repository -y ppa:theofficialgman/gpu-tools
|
|
|
|
sudo apt-get update -y
|
2024-02-26 12:26:44 -06:00
|
|
|
sudo apt-get install ccache apksigner -y
|
2022-04-04 13:18:33 -05:00
|
|
|
- name: Build
|
2023-06-26 19:42:00 -05:00
|
|
|
run: JAVA_HOME=$JAVA_HOME_17_X64 ./.ci/android.sh
|
2022-08-24 11:42:21 -05:00
|
|
|
env:
|
|
|
|
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
|
|
|
|
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
|
|
|
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
|
2023-06-26 19:42:00 -05:00
|
|
|
- name: Pack
|
|
|
|
run: ../../../.ci/pack.sh
|
|
|
|
working-directory: src/android/app
|
|
|
|
env:
|
2023-12-19 20:51:47 -06:00
|
|
|
UNPACKED: 1
|
2022-04-04 13:18:33 -05:00
|
|
|
- name: Upload
|
2024-02-18 10:23:15 -06:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-04-04 13:18:33 -05:00
|
|
|
with:
|
2023-06-26 19:42:00 -05:00
|
|
|
name: ${{ env.OS }}-${{ env.TARGET }}
|
|
|
|
path: src/android/app/artifacts/
|
2020-11-11 23:21:35 -06:00
|
|
|
release:
|
2024-03-29 13:30:55 -05:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2020-11-11 23:21:35 -06:00
|
|
|
runs-on: ubuntu-latest
|
2023-06-26 19:42:00 -05:00
|
|
|
needs: [windows, linux, macos-universal, android, source]
|
2020-11-11 23:21:35 -06:00
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
|
|
steps:
|
2024-02-18 10:23:15 -06:00
|
|
|
- uses: actions/download-artifact@v4
|
2020-11-11 23:21:35 -06:00
|
|
|
- name: Create release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
2024-03-29 12:43:37 -05:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-11-11 23:21:35 -06:00
|
|
|
with:
|
2023-04-06 07:34:35 -05:00
|
|
|
tag_name: ${{ github.ref_name }}
|
|
|
|
release_name: ${{ github.ref_name }}
|
2020-11-11 23:21:35 -06:00
|
|
|
draft: false
|
|
|
|
prerelease: false
|
|
|
|
- name: Upload artifacts
|
2024-03-28 13:04:54 -05:00
|
|
|
uses: alexellis/upload-assets@0.4.1
|
2020-11-11 23:21:35 -06:00
|
|
|
env:
|
2024-03-29 12:43:37 -05:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-11-11 23:21:35 -06:00
|
|
|
with:
|
2024-08-14 08:52:55 -05:00
|
|
|
asset_paths: '["./**/*.tar.*","./**/*.AppImage","./**/*.zip","./**/*.apk","./**/*.aab",]'
|