-
Notifications
You must be signed in to change notification settings - Fork 1
111 lines (94 loc) · 3.01 KB
/
build_binaries.yml
File metadata and controls
111 lines (94 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
on:
push:
tags:
- "*.*.*"
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check-out repository
uses: actions/checkout@v4
- name: Setup Python
id: setup_python
uses: actions/setup-python@v5
with:
python-version: '3.13'
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
- name: Install poetry
run: |
which python
python -m pip install pipx
python -m pipx install poetry
which poetry
python --version
# Use in-project venv but don't cache it to avoid mismatch/broken issues
- name: Bind Poetry to runner Python (Linux/macOS)
if: matrix.os != 'windows-latest'
shell: bash
run: |
if [ -x .venv/bin/python ]; then
echo "Cached venv Python: $(.venv/bin/python --version)"
fi
echo "Runner Python: $(python --version)"
poetry env use "$(command -v python)"
- name: Bind Poetry to runner Python (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
if (Test-Path .venv\Scripts\python.exe) { & .venv\Scripts\python.exe --version }
python --version
poetry env use (Get-Command python).Source
- name: Install Dependencies
run: |
poetry install --with dev
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
- name: Activate venv on Windows
if: matrix.os == 'windows-latest'
run: |
echo ".venv\Scripts" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Activate venv on Linux/macOS
if: matrix.os != 'windows-latest'
run: echo ".venv/bin" >> $GITHUB_PATH
# Intentionally do not cache .venv
- name: Install system build deps (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y python3-dev patchelf gcc
- name: show py
run: |
which python
which poetry
echo $PATH
python --version
- name: Build (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
./scripts/build-windows.ps1
- name: Build (Linux)
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
bash ./scripts/build-linux.sh
- name: Build (macOS)
if: matrix.os == 'macos-latest'
shell: bash
run: |
bash ./scripts/build-macos.sh
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }} Build
path: |
build/DerpiWallpaper.exe
build/DerpiWallpaper.bin
build/DerpiWallpaper
include-hidden-files: true