-
-
Notifications
You must be signed in to change notification settings - Fork 188
174 lines (141 loc) · 5.54 KB
/
weekly-automatic-builds.yml
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: weekly-automatic-compilations
on:
schedule:
- cron: "0 1 * * 0" # Execute Sundays at 1 AM UTC
workflow_dispatch:
permissions:
contents: write # Necessary to publish on GitHub Releases
env:
PYTHON_VERSION: "3.11"
jobs:
build:
name: Build UPBGE (${{ matrix.os }} - ${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- os: linux
arch: x86_64
runner: ubuntu-24.04
- os: windows
arch: x86_64
runner: windows-latest
#- os: windows
# arch: arm64
# runner: windows-latest
#- os: macos
# arch: x86_64
# runner: macos-13
#- os: macos
# arch: arm64
# runner: macos-14
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
repository: "UPBGE/upbge"
ref: "master"
path: "upbge"
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '${{env.PYTHON_VERSION}}'
- name: Install Python Dependencies (Linux/macOS)
if: matrix.os != 'windows'
run: |
curl https://bootstrap.pypa.io/get-pip.py | python
python -m pip install numpy requests cython idna charset-normalizer urllib3 certifi zstandard pybind11
- name: Install Python Dependencies (Windows)
if: matrix.os == 'windows'
run: |
Invoke-WebRequest -Uri "https://bootstrap.pypa.io/get-pip.py" -OutFile "get-pip.py"
python get-pip.py
python -m pip install numpy requests cython idna charset-normalizer urllib3 certifi zstandard pybind11
- name: Install Dependencies (Linux)
if: matrix.os == 'linux'
run: |
sudo apt update && \
sudo apt dist-upgrade && \
sudo apt install -y build-essential git-lfs git subversion cmake ninja-build \
cmake-curses-gui cmake-gui patch libx11-dev \
libxxf86vm-dev libxcursor-dev libxi-dev libxrandr-dev libxinerama-dev libegl-dev \
libwayland-dev wayland-protocols libxkbcommon-dev libdbus-1-dev linux-libc-dev
- name: Install Dependencies (Windows)
if: matrix.os == 'windows'
run: |
choco install ninja cmake git
- name: Install Dependencies (macOS)
if: matrix.os == 'macos'
run: |
brew install ninja cmake
- name: Download Precompiled Libs (Linux)
if: matrix.os == 'linux'
run: cd upbge && ./build_files/utils/make_update.py --use-linux-libraries
- name: Download Precompiled Libs (macOS)
if: matrix.os == 'macos'
run: cd upbge && make update
- name: Download Precompiled Libs (Windows)
if: matrix.os == 'windows'
run: cd upbge && echo y | ./make.bat update
- name: Configure CMake (Linux)
if: matrix.os == 'linux'
run: cmake -S upbge -B build -C upbge/build_files/cmake/config/blender_release.cmake -DCMAKE_BUILD_TYPE=Release -DWITH_INSTALL_PORTABLE=ON -DWITH_VULKAN_BACKEND=ON -DWITH_GHOST_WAYLAND=ON -DPYTHON_VERSION="3.11"
- name: Configure CMake (Windows)
if: matrix.os == 'windows'
run: cmake -S upbge -B build -C upbge/build_files/cmake/config/blender_release.cmake -DWITH_WINDOWS_RELEASE_PDB=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_VULKAN_BACKEND=ON -DPYTHON_VERSION="3.11"
- name: Configure CMake (macOS)
if: matrix.os == 'macos'
run: cmake -S upbge -B build -C upbge/build_files/cmake/config/blender_release.cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_VERSION="3.11"
- name: Build UPBGE (Linux)
if: matrix.os == 'linux'
run: make -C build -j `nproc`
- name: Build UPBGE (macOS)
if: matrix.os == 'macOS'
run: make -C build
- name: Build UPBGE (Windows)
if: matrix.os == 'windows'
run: cmake --build build --target install --config Release
- name: Copy Release Scripts (Linux / macOS)
if: matrix.os != 'windows'
run: make -C build install
- name: Archive Build (Linux/macOS)
if: matrix.os != 'windows'
run: |
DATE=$(date +"%Y-%m-%d")
tar zcvf upbge-${{ matrix.os }}-${{ matrix.arch }}-$DATE.tar.gz build/bin
- name: Archive Build (Windows)
if: matrix.os == 'windows'
run: |
$DATE = Get-Date -Format "yyyy-MM-dd"
Compress-Archive -Path build\bin -DestinationPath upbge-${{ matrix.os }}-${{ matrix.arch }}-$DATE.zip
- name: Upload Build as Artifact
uses: actions/upload-artifact@v4
with:
name: upbge-${{ matrix.os }}-${{ matrix.arch }}
path: upbge-${{ matrix.os }}-${{ matrix.arch }}-*.*
retention-days: 7
release:
name: Publish Release
runs-on: ubuntu-latest
needs: build
steps:
- name: Download all build artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: weekly-build-${{ github.run_number }}
name: Weekly UPBGE Build # Title in the Release webpage
body: |
**Automated Weekly Build of UPBGE**
- Linux (x86_64)
- Windows (x86_64, ARM64)
- macOS (Intel, ARM64)
Download the corresponding file for your OS below.
draft: false
prerelease: false
files: artifacts/**/*