2024-04-26 09:10:23 +08:00
|
|
|
name: build
|
2024-04-26 05:49:49 +08:00
|
|
|
|
2024-04-26 08:43:34 +08:00
|
|
|
on:
|
|
|
|
push:
|
2024-10-18 20:03:38 +08:00
|
|
|
paths: [ '.github/workflows/build.yml','src/**']
|
2024-04-26 08:43:34 +08:00
|
|
|
pull_request:
|
2024-10-18 20:03:38 +08:00
|
|
|
paths: [ '.github/workflows/build.yml','src/**']
|
2024-04-26 05:49:49 +08:00
|
|
|
|
|
|
|
jobs:
|
2024-11-02 19:55:32 +08:00
|
|
|
pyrt:
|
2024-04-26 05:49:49 +08:00
|
|
|
runs-on: windows-latest
|
2024-04-26 17:18:10 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-11-02 19:55:32 +08:00
|
|
|
architecture: [x86, x64]
|
2024-04-26 05:49:49 +08:00
|
|
|
steps:
|
2024-11-02 19:55:32 +08:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
2024-04-26 05:49:49 +08:00
|
|
|
with:
|
2024-06-25 17:53:01 +08:00
|
|
|
python-version: '3.7.9'
|
2024-04-26 17:18:10 +08:00
|
|
|
architecture: ${{ matrix.architecture }}
|
2024-05-01 17:40:57 +08:00
|
|
|
|
2024-11-02 19:55:32 +08:00
|
|
|
- run: python src/build.py pyrt ${{ matrix.architecture }} 3.7.9
|
|
|
|
- uses: actions/upload-artifact@v4
|
2024-05-01 22:45:59 +08:00
|
|
|
with:
|
2024-11-02 19:55:32 +08:00
|
|
|
name: pyrt_${{ matrix.architecture }}
|
|
|
|
path: src/pyrt
|
|
|
|
build_cpp:
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
architecture: [x86, x64]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
|
|
|
|
with:
|
|
|
|
sdk-version: 22621
|
|
|
|
|
|
|
|
- run: python src/build.py cpp ${{ matrix.architecture }}
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: cpp_${{ matrix.architecture }}
|
|
|
|
path: src/plugins/builds
|
2024-05-01 22:45:59 +08:00
|
|
|
|
2024-11-02 19:55:32 +08:00
|
|
|
|
|
|
|
release:
|
|
|
|
runs-on: windows-latest
|
|
|
|
needs: [pyrt,build_cpp]
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- architecture: x86
|
|
|
|
fname: LunaTranslator_x86
|
|
|
|
- architecture: x64
|
|
|
|
fname: LunaTranslator
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/download-artifact@v4
|
|
|
|
with:
|
|
|
|
path: build
|
|
|
|
- run: python src/build.py merge ${{ matrix.architecture }}
|
2024-04-26 17:18:10 +08:00
|
|
|
- uses: actions/upload-artifact@v4
|
2024-04-26 05:49:49 +08:00
|
|
|
with:
|
2024-04-26 17:18:10 +08:00
|
|
|
name: ${{ matrix.fname }}
|
2024-11-02 19:55:32 +08:00
|
|
|
path: src/build/${{matrix.fname}}.zip
|