Skip to content

Commit 38e5e7d

Browse files
committed
Test all targets in CI.
1 parent 0ea809b commit 38e5e7d

File tree

2 files changed

+46
-8
lines changed

2 files changed

+46
-8
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,50 @@
11
name: CI
22

3-
on:
4-
push:
5-
pull_request:
3+
on: [push, pull_request]
64

75
jobs:
8-
build:
6+
7+
compile_native:
8+
name: Compile (native)
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Install dependencies
13+
run: sudo apt update
14+
- name: Compile
15+
run: make -j$(nproc)
16+
17+
compile_win:
18+
name: Compile (${{ matrix.target }})
919
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
include:
23+
- target: win32
24+
apt_pkg: gcc-mingw-w64-i686-win32
25+
make_args: PLATFORM=win32
26+
- target: win64
27+
apt_pkg: gcc-mingw-w64-x86-64-win32
28+
make_args: PLATFORM=win64
1029
steps:
1130
- uses: actions/checkout@v4
31+
- name: Install dependencies
32+
run: |
33+
sudo apt update
34+
sudo apt install -y ${{ matrix.apt_pkg }}
1235
- name: Compile
36+
run: make ${{ matrix.make_args }} -j$(nproc)
37+
38+
compile_appimage:
39+
name: Compile (musl, AppImage)
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
- name: Install dependencies
1344
run: |
14-
cd src
15-
make -j$(nproc)
45+
sudo apt update
46+
sudo apt install -y musl-tools
47+
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
48+
chmod +x /usr/local/bin/appimagetool
49+
- name: Compile
50+
run: make PLATFORM=musl NSIGN=1 -j$(nproc) appimage

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ ifeq ($(MAKECMDGOALS),release)
22

33
.PHONY: release
44
release:
5-
$(MAKE) PLATFORM=musl appimage-zip
65
$(MAKE) PLATFORM=musl zip
6+
$(MAKE) PLATFORM=musl appimage-zip
77
$(MAKE) PLATFORM=win32 zip
88
$(MAKE) PLATFORM=win64 zip
99
mkdir -p release
@@ -13,7 +13,7 @@ else ifeq ($(MAKECMDGOALS),clean-all)
1313

1414
.PHONY: clean-all
1515
clean-all:
16-
$(MAKE) PLATFORM=linux clean
16+
$(MAKE) clean
1717
$(MAKE) PLATFORM=musl clean
1818
$(MAKE) PLATFORM=win32 clean
1919
$(MAKE) PLATFORM=win64 clean
@@ -56,7 +56,10 @@ APPOUTDIR = appimage
5656
CFLAGS += -O3 -flto -Wall -D_DEFAULT_SOURCE -DVERSION=$(VERSION) -std=c99 #-DSNDSERV -DUSEASM
5757
LDFLAGS += -flto
5858
LIBS += -lm
59+
60+
ifndef NSIGN
5961
APPFLAGS += --sign
62+
endif
6063

6164
SRC = i_main.c dummy.c am_map.c doomdef.c doomstat.c dstrings.c d_event.c d_items.c d_iwad.c \
6265
d_loop.c d_main.c d_mode.c d_net.c f_finale.c f_wipe.c g_game.c hu_lib.c hu_stuff.c info.c \

0 commit comments

Comments
 (0)