Skip to content

Commit de03294

Browse files
committed
Create a test workflow
1 parent cfc4fb1 commit de03294

File tree

2 files changed

+75
-43
lines changed

2 files changed

+75
-43
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Copyright (c) FAForever
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
name: Test
22+
23+
# Note: due to piracy concerns we should at no point upload the executable as
24+
# an artifact. We do not want the lua-compatible executable available to the
25+
# public without verification that they own the game. This verification is
26+
# done via the client.
27+
28+
on:
29+
push:
30+
branches: ["main"]
31+
pull_request:
32+
branches: ["main"]
33+
34+
jobs:
35+
test:
36+
runs-on: windows-latest
37+
permissions:
38+
contents: write
39+
40+
steps:
41+
# clone everything that we need
42+
- uses: actions/checkout@v4
43+
with:
44+
path: fa-python-binary-patcher
45+
46+
- uses: actions/checkout@v4
47+
with:
48+
repository: FAForever/FA-Binary-Patches
49+
path: fa-binary-patches
50+
51+
# install everything that we need
52+
- uses: actions/setup-python@v5
53+
with:
54+
python-version: "3.12"
55+
56+
- name: Install MinGW i686
57+
run: choco install mingw --x86 -y --no-progress
58+
59+
- name: Update PATH
60+
run: echo C:/ProgramData/mingw64/mingw32/bin/ >> $env:GITHUB_PATH
61+
62+
- name: Install fa-python-binary-patcher
63+
run: |
64+
pip install -r ./fa-python-binary-patcher/requirements.txt
65+
66+
# download base executable
67+
- name: Download base executable
68+
run: curl -L "https://content.faforever.com/build/ForgedAlliance_base.exe" -o ForgedAlliance_base.exe
69+
70+
# patch it, if it works then we're good
71+
- name: Patch base executable
72+
run: |
73+
echo "#define gitsha \"${{ github.sha }}\"" > workflow.cpp
74+
mkdir build
75+
python ./fa-python-binary-patcher/main.py "$(pwd)" clang++ ld g++

0 commit comments

Comments
 (0)