Skip to content

Commit 2be1218

Browse files
authored
Modify CI workflow for cross-compilation
Updated Windows build flags and artifact naming.
1 parent 6be7b91 commit 2be1218

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

.github/workflows/makefile.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
branches: [ main ]
87
release:
98
types: [ created ]
109

@@ -26,15 +25,13 @@ jobs:
2625
os: ubuntu-latest
2726
target: phira-mp-server-linux-arm64
2827
cxx: aarch64-linux-gnu-g++
29-
3028
packages: >-
3129
g++-aarch64-linux-gnu
3230
libssl-dev:arm64
3331
uuid-dev:arm64
3432
ldflags: -pthread -luuid -lssl -lcrypto -static
3533
multiarch: arm64
3634

37-
3835
- name: linux-armhf
3936
os: ubuntu-latest
4037
target: phira-mp-server-linux-armhf
@@ -46,22 +43,19 @@ jobs:
4643
ldflags: -pthread -luuid -lssl -lcrypto -static
4744
multiarch: armhf
4845

49-
5046
- name: windows-amd64
5147
os: windows-latest
52-
target: phira-mp-server-windows-amd64.exe
5348

5449
runs-on: ${{ matrix.os }}
5550

5651
steps:
5752
- uses: actions/checkout@v4
5853

59-
6054
- name: Enable multiarch
6155
if: runner.os == 'Linux' && matrix.multiarch != ''
6256
run: |
63-
sudo dpkg --add-architecture ${{ matrix.multiarch }}
6457
sudo apt-get update
58+
sudo dpkg --add-architecture ${{ matrix.multiarch }}
6559
6660
- name: Install Linux dependencies
6761
if: runner.os == 'Linux'
@@ -77,6 +71,7 @@ jobs:
7771
TARGET=${{ matrix.target }} \
7872
LDFLAGS="${{ matrix.ldflags }}"
7973
74+
# ── Windows: MSYS2 + MinGW-w64 ───────────────────────────
8075
- name: Setup MSYS2 (Windows)
8176
if: runner.os == 'Windows'
8277
uses: msys2/setup-msys2@v2
@@ -86,6 +81,7 @@ jobs:
8681
install: >-
8782
mingw-w64-x86_64-gcc
8883
mingw-w64-x86_64-openssl
84+
mingw-w64-x86_64-libuuid
8985
make
9086
9187
- name: Build (Windows)
@@ -95,12 +91,12 @@ jobs:
9591
make \
9692
CXX=x86_64-w64-mingw32-g++ \
9793
TARGET=phira-mp-server-windows-amd64.exe \
98-
LDFLAGS="-pthread -lssl -lcrypto -lrpcrt4 -lws2_32 -lcrypt32 -static"
94+
LDFLAGS="-pthread -luuid -lssl -lcrypto -lws2_32 -lcrypt32 -static"
9995
10096
- name: Upload artifact
10197
uses: actions/upload-artifact@v4
10298
with:
103-
name: phira-mp-server-${{ matrix.name }}
99+
name: phira-mp-server${{ matrix.name }}
104100
path: |
105101
phira-mp-server-*
106102
*.exe

0 commit comments

Comments
 (0)