Skip to content

Commit 95f6e6a

Browse files
authored
Github Build Packages (#25)
1 parent 1630507 commit 95f6e6a

File tree

11 files changed

+65
-14
lines changed

11 files changed

+65
-14
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Make Release
2+
on:
3+
workflow_dispatch:
4+
5+
env:
6+
# Path to the solution file relative to the root of the project.
7+
SOLUTION_FILE_PATH: .
8+
9+
permissions:
10+
contents: write
11+
12+
defaults:
13+
run:
14+
shell: bash {0}
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Build
25+
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+
31+
- name: Release
32+
uses: softprops/action-gh-release@v1
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
with:
36+
files: "build/unix/toolshed-*.tgz"
37+

build/unix/Makefile

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,26 @@ else
1212
INSTALLDIR = /usr/local/bin
1313
DOCDIR = /usr/local/share/toolshed
1414
endif
15+
APPS = ar2 os9 mamou cecb decb tocgen makewav dis68
16+
APPS := $(foreach item,$(APPS),$(item)/$(item)$(SUFEXE))
17+
1518
DIRS = libtoolshed libnative libcecb librbf libcoco libdecb libmisc libsys \
16-
decb cecb os9 makewav tocgen cocofuse \
19+
decb cecb os9 makewav tocgen \
1720
dis68 mamou ar2 \
18-
doc lst2cmt unittest
21+
doc
22+
23+
ifneq ($(WIN),)
24+
PACKAGENAME = toolshed-win64-$(VERSION).tgz
25+
else
26+
DIRS := $(DIRS) cocofuse lst2cmt unittest
27+
endif
1928

2029
all:
2130
$(foreach dir, $(DIRS), (cd $(dir); $(MAKE));)
2231

2332
install: all
2433
$(INSTALL) -d $(INSTALLDIR) $(DOCDIR)
25-
$(INSTALL) ar2/ar2 os9/os9 mamou/mamou cecb/cecb decb/decb \
26-
tocgen/tocgen makewav/makewav dis68/dis68 lst2cmt/lst2cmt $(INSTALLDIR)
27-
-$(INSTALL) cocofuse/cocofuse $(INSTALLDIR)
34+
$(INSTALL) $(APPS) $(INSTALLDIR)
2835
$(INSTALL) -m 0644 doc/ToolShed.html $(DOCDIR)
2936

3037
package: INSTALLDIR=toolshed-$(VERSION)
@@ -33,6 +40,8 @@ package: install
3340
tar czvf $(PACKAGENAME) toolshed-$(VERSION)
3441
rm -rf toolshed-$(VERSION)
3542

36-
clean:
43+
cleandirs:
3744
$(foreach dir, $(DIRS), (cd $(dir); $(MAKE) clean);)
45+
46+
clean: cleandirs
3847
$(RM) $(PACKAGENAME)

build/unix/ar2/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CFLAGS += -DSYSV
88
BINARY = ar2
99
OBJS = ar.o arsup.o lz1.o o2u.o
1010

11-
$(BINARY): $(OBJS)
11+
$(BINARY)$(SUFEXE): $(OBJS)
1212
$(CC) $(OBJS) -o $@ $(DEBUG)
1313

1414
$(OBJS):

build/unix/cecb/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ vpath %.c ../../../cecb ../../../os9
66
CFLAGS += -I../../../include -Wall
77
LDFLAGS += -L../libtoolshed -L../libcoco -L../libcecb -L../libnative -L../librbf -L../libdecb -L../libmisc -L../libsys -ltoolshed -lcoco -ldecb -lcecb -lnative -lrbf -lmisc -lsys -lm
88

9-
cecb: cecbbulkerase.o cecbdir.o cecbfstat.o cecb_main.o cecbcopy.o ../os9/os9dump.o ../decb/decblist.o
9+
cecb$(SUFEXE): cecbbulkerase.o cecbdir.o cecbfstat.o cecb_main.o cecbcopy.o ../os9/os9dump.o ../decb/decblist.o
1010
$(CC) -o $@ $^ $(LDFLAGS)
1111

1212
clean:

build/unix/decb/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ vpath %.c ../../../decb ../../../os9
66
CFLAGS += -I../../../include -Wall
77
LDFLAGS += -L../libtoolshed -L../libcoco -L../libnative -L../libcecb -L../librbf -L../libdecb -L../libmisc -L../libsys -ltoolshed -lcoco -lnative -lcecb -lrbf -ldecb -lmisc -lsys -lm
88

9-
decb: decb_main.o decbattr.o decbcopy.o decbdir.o decbdskini.o decbfree.o decbfstat.o \
9+
decb$(SUFEXE): decb_main.o decbattr.o decbcopy.o decbdir.o decbdskini.o decbfree.o decbfstat.o \
1010
decbhdbconv.o decbkill.o decblist.o decbrename.o os9dump.o decbdsave.o os9dsave.o
1111
$(CC) -o $@ $^ $(LDFLAGS)
1212

build/unix/dis68/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ include ../rules.mak
33

44
vpath %.c ../../../dis68
55

6-
dis68: dis68.o disasm.o addmod.o symtbl.o
6+
dis68$(SUFEXE): dis68.o disasm.o addmod.o symtbl.o
7+
$(CC) -o $@ $^ $(LDFLAGS)
78

89
clean:
910
$(RM) *.o dis68 dis68.exe

build/unix/makewav/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ BINARY = makewav
99
OBJS = makewav.o
1010
LIBS = -lm
1111

12-
$(BINARY): $(OBJS)
12+
$(BINARY)$(SUFEXE): $(OBJS)
1313
$(CC) $(OBJS) $(LIBS) -o $@
1414

1515
clean:

build/unix/mamou/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ DEBUG = -g
77
CFLAGS += -DLINUX -I../../../include $(DEBUG) -Wall
88
LDFLAGS += -L../libcoco -L../libnative -L../libcecb -L../libdecb -L../librbf -L../libmisc -L../libsys -lcoco -lnative -ldecb -lcecb -lrbf -lmisc -lsys -lm $(DEBUG)
99

10-
mamou: mamou_main.o evaluator.o pseudo.o h6309.o ffwd.o \
10+
mamou$(SUFEXE): mamou_main.o evaluator.o pseudo.o h6309.o ffwd.o \
1111
print.o util.o symbol_bucket.o
1212
$(CC) -o $@ $^ $(LDFLAGS)
1313

build/unix/os9/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ vpath %.c ../../../os9
55

66
LDFLAGS += -L../libtoolshed -L../libcecb -L../libcoco -L../libnative -L../libdecb -L../libmisc -L../librbf -L../libsys -ltoolshed -lcoco -lnative -ldecb -lcecb -lmisc -lrbf -lsys -lm
77

8-
os9: os9copy.o os9dsave.o os9gen.o os9modbust.o os9dcheck.o os9dump.o \
8+
os9$(SUFEXE): os9copy.o os9dsave.o os9gen.o os9modbust.o os9dcheck.o os9dump.o \
99
os9id.o os9padrom.o os9_main.o os9del.o os9format.o os9ident.o \
1010
os9rename.o os9attr.o os9deldir.o os9free.o os9list.o os9cmp.o \
1111
os9dir.o os9fstat.o os9makdir.o

build/unix/rules.mak

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ AR = $(CROSS)ar
1313
RANLIB = $(CROSS)ranlib
1414
CC = $(CROSS)cc
1515

16+
ifneq ($(WIN),)
17+
SUFEXE = .exe
18+
endif
19+
1620
%.l: %.r
1721
$(MERGE) $< > $@
1822

0 commit comments

Comments
 (0)