Skip to content

Commit 4b03686

Browse files
committed
Add new build targets & update workflows
1 parent 71348dd commit 4b03686

File tree

3 files changed

+34
-12
lines changed

3 files changed

+34
-12
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ jobs:
3535

3636
- name: Build Linux
3737
run: |
38-
sudo make -C build/unix package
39-
38+
sudo make -C build/unix unixpackage
4039
4140
- name: Build Windows
4241
run: |
43-
sudo make -C build/unix cleandirs
44-
sudo make -C build/unix CC=x86_64-w64-mingw32-gcc WIN=1 package || exit 1
42+
sudo make -C build/unix winpackage
4543
4644
- name: Results
4745
run: |

.github/workflows/release.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,25 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21+
- name: Setup Requirements
22+
run: |
23+
sudo apt-get install mingw-w64 markdown libfuse-dev
24+
2125
- name: Checkout
2226
uses: actions/checkout@v4
2327

24-
- name: Build
28+
- name: Build Linux
2529
run: |
26-
sudo apt-get install mingw-w64 markdown libfuse-dev
27-
sudo make -C build/unix package
28-
sudo make -C build/unix cleandirs
29-
sudo make -C build/unix CC=x86_64-w64-mingw32-gcc WIN=1 package
30+
sudo make -C build/unix unixpackage
31+
32+
- name: Build Windows
33+
run: |
34+
sudo make -C build/unix winpackage
35+
36+
- name: Results
37+
run: |
38+
md5sum build/unix/toolshed-*.tgz
39+
ls build/unix/toolshed-*.tgz | xargs -I {} bash -c 'ls -al --color=auto {}; tar tzvf {}'
3040
3141
- name: Release
3242
uses: softprops/action-gh-release@v1

build/unix/Makefile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ include rules.mak
44

55
vpath %.c ../../mamou:../../os9
66

7-
PACKAGENAME = toolshed-unix64-$(VERSION).tgz
7+
PACKAGENAME_UNIX = toolshed-unix64-$(VERSION).tgz
8+
PACKAGENAME_WIN = toolshed-win64-$(VERSION).tgz
9+
810
ifneq ($(DESTDIR),)
911
INSTALLDIR = $(DESTDIR)/usr/bin
1012
DOCDIR = $(DESTDIR)/usr/share/doc/toolshed
@@ -20,8 +22,9 @@ DIRS = libtoolshed libnative libcecb librbf libcoco libdecb libmisc libsys \
2022
doc
2123

2224
ifneq ($(WIN),)
23-
PACKAGENAME = toolshed-win64-$(VERSION).tgz
25+
PACKAGENAME = $(PACKAGENAME_WIN)
2426
else
27+
PACKAGENAME = $(PACKAGENAME_UNIX)
2528
DIRS := $(DIRS) cocofuse lst2cmt unittest
2629
APPS := $(APPS) cocofuse
2730
endif
@@ -46,4 +49,15 @@ cleandirs:
4649
$(foreach dir, $(DIRS), (cd $(dir); $(MAKE) clean);)
4750

4851
clean: cleandirs
49-
$(RM) $(PACKAGENAME)
52+
$(RM) $(PACKAGENAME_WIN) $(PACKAGENAME_UNIX)
53+
54+
unixpackage:
55+
$(MAKE) -f ./Makefile package
56+
57+
winpackage:
58+
$(MAKE) -f ./Makefile cleandirs
59+
$(MAKE) -f ./Makefile CC=x86_64-w64-mingw32-gcc WIN=1 package
60+
61+
allpackages: clean unixpackage winpackage
62+
63+

0 commit comments

Comments
 (0)