axmol/.github/workflows/pr.yml

182 lines
4.0 KiB
YAML
Raw Normal View History

2020-10-25 20:21:01 +08:00
name: pull_request
2020-10-25 20:15:49 +08:00
2021-07-07 12:41:15 +08:00
on:
pull_request:
2021-09-17 16:09:00 +08:00
paths-ignore:
- '**.md'
2022-07-15 18:51:17 +08:00
- 'docs/**'
2020-10-25 20:15:49 +08:00
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
PULL_REQUEST: yes
2020-10-25 20:15:49 +08:00
jobs:
build-windows:
name: build-windows
2020-10-25 20:15:49 +08:00
runs-on: windows-latest
strategy:
matrix:
config:
- {arch: x86, dll: false}
- {arch: x64, dll: false}
- {arch: x86, dll: true}
- {arch: x64, dll: true}
env:
BUILD_ARCH: ${{ matrix.config.arch }}
BUILD_DLL: ${{ matrix.config.dll }}
2020-10-25 20:15:49 +08:00
steps:
2022-10-20 22:20:33 +08:00
- uses: actions/checkout@v3
2020-10-25 20:19:28 +08:00
with:
submodules: 'recursive'
2020-10-25 20:15:49 +08:00
- name: Setup Python
2023-03-25 11:14:51 +08:00
uses: actions/setup-python@v4
with:
python-version: '3.7.8'
2023-02-25 11:06:54 +08:00
- uses: ilammy/msvc-dev-cmd@v1.12.1
2023-01-12 11:38:08 +08:00
with:
arch: ${{ env.BUILD_ARCH }}
2020-10-25 20:15:49 +08:00
- name: Build
2023-06-29 19:46:52 +08:00
shell: pwsh
run: .\build.ps1 -p win32 -a $env:BUILD_ARCH -dll $env:BUILD_DLL
2020-10-25 20:15:49 +08:00
build-windows-clang:
runs-on: windows-latest
strategy:
matrix:
arch:
- x64
env:
BUILD_ARCH: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.7.8'
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "16.0"
- name: Build
2023-06-29 19:46:52 +08:00
shell: pwsh
run: .\build.ps1 -p win32 -a x64 -cc clang
build-winuwp:
name: build-winuwp
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Setup Python
2023-03-25 11:14:51 +08:00
uses: actions/setup-python@v4
with:
python-version: '3.7.8'
- uses: ilammy/msvc-dev-cmd@v1.12.1
with:
2023-06-24 11:54:33 +08:00
arch: x64
uwp: true
- name: Build
2023-06-29 19:46:52 +08:00
shell: pwsh
run: .\build.ps1 -p winuwp -a x64
2020-10-25 20:15:49 +08:00
build-linux:
name: build-linux
runs-on: ubuntu-latest
2020-10-25 20:15:49 +08:00
env:
GH_OS_NAME: linux
2020-10-25 20:15:49 +08:00
BUILD_TARGET: linux
steps:
2022-10-20 22:20:33 +08:00
- uses: actions/checkout@v3
2020-10-25 20:19:28 +08:00
with:
submodules: 'recursive'
2023-06-29 19:46:52 +08:00
- name: Install deps
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
2020-10-25 20:15:49 +08:00
run: |
2023-06-29 19:46:52 +08:00
AX_ROOT=`pwd`
2023-07-06 12:22:41 +08:00
echo -e "y" | pwsh $AX_ROOT/setup.ps1
2023-06-29 19:46:52 +08:00
- name: Build
shell: pwsh
run: ./build.ps1 -p linux -a x64
2020-10-25 20:15:49 +08:00
build-android:
name: build-android
2022-08-18 09:13:09 +08:00
runs-on: ubuntu-latest
2021-06-07 17:28:50 +08:00
strategy:
matrix:
arch:
2023-06-29 19:46:52 +08:00
- armv7
- arm64
2021-06-07 17:28:50 +08:00
- x86
2023-06-29 19:46:52 +08:00
- x64
2020-10-25 20:15:49 +08:00
env:
GH_OS_NAME: linux
2020-10-25 20:15:49 +08:00
BUILD_TARGET: android
2021-06-07 17:28:50 +08:00
BUILD_ARCH: ${{ matrix.arch }}
2020-10-25 20:15:49 +08:00
steps:
2022-10-20 22:20:33 +08:00
- uses: actions/checkout@v3
2020-10-25 20:19:28 +08:00
with:
submodules: 'recursive'
2020-10-25 20:15:49 +08:00
- name: Build
2023-06-29 19:46:52 +08:00
shell: pwsh
2020-10-25 20:15:49 +08:00
run: |
2023-06-29 19:46:52 +08:00
$AX_ROOT = $(Get-Location).Path
./build.ps1 -p android -a $env:BUILD_ARCH
2020-10-25 20:15:49 +08:00
build-osx:
name: build-osx
2022-08-18 09:13:09 +08:00
runs-on: macos-12
strategy:
matrix:
arch:
- x86_64
- arm64
2020-10-25 20:15:49 +08:00
env:
GH_OS_NAME: osx
2020-10-25 20:15:49 +08:00
BUILD_TARGET: osx
2022-08-18 09:13:09 +08:00
BUILD_ARCH: ${{ matrix.arch }}
2020-10-25 20:15:49 +08:00
steps:
2022-10-20 22:20:33 +08:00
- uses: actions/checkout@v3
2020-10-25 20:19:28 +08:00
with:
submodules: 'recursive'
2022-10-23 13:32:18 +08:00
2020-10-25 20:15:49 +08:00
- name: Build
2023-06-29 19:46:52 +08:00
shell: pwsh
2020-10-25 20:15:49 +08:00
run: |
./build.ps1 -p osx -a $env:BUILD_ARCH
2020-10-25 20:15:49 +08:00
build-ios:
name: build-ios
runs-on: macos-latest
env:
GH_OS_NAME: osx
2020-10-25 20:15:49 +08:00
BUILD_TARGET: ios
steps:
2022-10-20 22:20:33 +08:00
- uses: actions/checkout@v3
2020-10-25 20:19:28 +08:00
with:
submodules: 'recursive'
2022-10-23 13:32:18 +08:00
2020-10-25 20:15:49 +08:00
- name: Build
2023-06-29 19:46:52 +08:00
shell: pwsh
run: ./build.ps1 -p ios -a 'x64'
build-tvos:
name: build-tvos
runs-on: macos-latest
env:
GH_OS_NAME: osx
BUILD_TARGET: tvos
steps:
2022-10-20 22:20:33 +08:00
- uses: actions/checkout@v3
with:
submodules: 'recursive'
2022-10-23 13:32:18 +08:00
- name: Build
2023-06-29 19:46:52 +08:00
shell: pwsh
run: |
./build.ps1 -p tvos -a 'x64'