53 lines
1.5 KiB
YAML
Raw Normal View History

2024-04-26 09:10:23 +08:00
name: build
2024-04-26 08:43:34 +08:00
on:
push:
2024-04-26 09:11:57 +08:00
paths: [ '.github/workflows/build.yml','build.py', 'LunaTranslator/**' , 'plugins/**' ]
2024-04-26 08:43:34 +08:00
pull_request:
2024-04-26 09:11:57 +08:00
paths: [ '.github/workflows/build.yml','build.py', 'LunaTranslator/**' , 'plugins/**']
jobs:
build:
runs-on: windows-latest
2024-04-26 17:18:10 +08:00
strategy:
matrix:
include:
- architecture: x86
2024-04-26 19:24:31 +08:00
fname: LunaTranslator_x86
2024-04-27 19:00:12 +08:00
debug: 0
2024-04-26 17:18:10 +08:00
- architecture: x64
2024-04-26 19:24:31 +08:00
fname: LunaTranslator
2024-04-27 19:00:12 +08:00
debug: 0
- architecture: x86
fname: LunaTranslator_x86_debug
debug: 1
- architecture: x64
fname: LunaTranslator_debug
debug: 1
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Windows 10 SDK
uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with:
sdk-version: 22621
2024-04-26 17:18:10 +08:00
- name: Install Python 3.7.9
uses: actions/setup-python@v5
with:
python-version: '3.7.9'
2024-04-26 17:18:10 +08:00
architecture: ${{ matrix.architecture }}
- name: Install Python 3.11
uses: actions/setup-python@v5
with:
2024-04-26 17:18:10 +08:00
python-version: '3.11'
architecture: x64
2024-04-26 17:18:10 +08:00
- name: Install Python 3.11 req
2024-04-26 23:13:46 +08:00
run: pip install cmake pefile requests
- name: Run build script
run: |
2024-04-27 19:00:12 +08:00
python build.py ${{ matrix.architecture }} ${{ matrix.debug }}
2024-04-26 17:18:10 +08:00
- uses: actions/upload-artifact@v4
with:
2024-04-26 17:18:10 +08:00
name: ${{ matrix.fname }}
2024-04-26 19:24:31 +08:00
path: build/${{ matrix.fname }}.zip