Subversion Repositories Krakow BASIC

Rev

Rev 32 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 nishi 1
# $Id$
10 nishi 2
 
14 nishi 3
name: "Build Krakow BASIC"
4
 
10 nishi 5
on:
6
  workflow_dispatch:
7
  push:
8
 
9
concurrency:
10
  group: "build"
11
  cancel-in-progress: true
12
 
13
jobs:
14
  build-c64:
15
    name: "Build for Commodore 64"
16
    runs-on: ubuntu-latest
15 nishi 17
 
10 nishi 18
    permissions:
19
      contents: write
20
 
21
    steps:
22
    - name: Checkout
23
      uses: actions/checkout@v4
24
    - name: Install packages
25
      run: sudo apt-get install cc65
26
    - name: Make sure it is clean
27
      run: make clean PLATFORM=c64
28
    - name: Make
29
      run: make PLATFORM=c64
30
    - name: Rename
31
      run: cp BASIC/krakow.80 krakow-c64.80
32
    - name: Upload artifact
33
      uses: actions/upload-artifact@v4
34
      with:
15 nishi 35
        name: build-c64
24 nishi 36
        path: krakow-c64.80
16 nishi 37
 
22 nishi 38
  build-a800xl:
39
    name: "Build for Atari 800 XL"
40
    runs-on: ubuntu-latest
41
 
42
    permissions:
43
      contents: write
44
 
45
    steps:
46
    - name: Checkout
47
      uses: actions/checkout@v4
48
    - name: Install packages
49
      run: sudo apt-get install cc65
50
    - name: Make sure it is clean
51
      run: make clean PLATFORM=a800xl
52
    - name: Make
53
      run: make PLATFORM=a800xl
54
    - name: Rename
55
      run: cp BASIC/krakow krakow-a800xl
56
    - name: Upload artifact
57
      uses: actions/upload-artifact@v4
58
      with:
59
        name: build-a800xl
60
        path: krakow-a800xl
61
 
23 nishi 62
  build-pet:
22 nishi 63
    name: "Build for Commodore PET"
64
    runs-on: ubuntu-latest
65
 
66
    permissions:
67
      contents: write
68
 
69
    steps:
70
    - name: Checkout
71
      uses: actions/checkout@v4
72
    - name: Install packages
73
      run: sudo apt-get install cc65
74
    - name: Make sure it is clean
75
      run: make clean PLATFORM=pet
76
    - name: Make
77
      run: make PLATFORM=pet
78
    - name: Rename
79
      run: cp BASIC/krakow.prg krakow-pet.prg
80
    - name: Upload artifact
81
      uses: actions/upload-artifact@v4
82
      with:
83
        name: build-pet
84
        path: krakow-pet.prg
85
 
25 nishi 86
  build-apple2:
87
    name: "Build for Apple 2"
88
    runs-on: ubuntu-latest
89
 
90
    permissions:
91
      contents: write
92
 
93
    steps:
94
    - name: Checkout
95
      uses: actions/checkout@v4
96
    - name: Install packages
97
      run: sudo apt-get install cc65 default-jre
98
    - name: Make sure it is clean
99
      run: make clean PLATFORM=apple2
100
    - name: Get AppleCommander
101
      run: wget https://github.com/AppleCommander/AppleCommander/releases/download/1.9.0/AppleCommander-ac-1.9.0.jar -O ac.jar
102
    - name: Get master.dsk
41 nishi 103
      run: wget http://f.nishi.boats/f/g/disk/dos33.dsk -O master.dsk
25 nishi 104
    - name: Make
105
      run: make PLATFORM=apple2
106
    - name: Rename
107
      run: cp BASIC/krakow.dsk krakow-apple2.dsk
108
    - name: Upload artifact
109
      uses: actions/upload-artifact@v4
110
      with:
111
        name: build-apple2
112
        path: krakow-apple2.dsk
113
 
26 nishi 114
  build-win32:
115
    name: "Build for Windows (32)"
116
    runs-on: ubuntu-latest
117
 
118
    permissions:
119
      contents: write
120
 
121
    steps:
122
    - name: Checkout
123
      uses: actions/checkout@v4
124
    - name: Install packages
125
      run: sudo apt-get install mingw-w64
126
    - name: Make sure it is clean
127
      run: make clean PLATFORM=win32
128
    - name: Make
129
      run: make PLATFORM=win32
130
    - name: Rename
131
      run: cp BASIC/krakow.exe krakow-win32.exe
132
    - name: Upload artifact
133
      uses: actions/upload-artifact@v4
134
      with:
135
        name: build-win32
136
        path: krakow-win32.exe
137
 
138
  build-win64:
139
    name: "Build for Windows (64)"
140
    runs-on: ubuntu-latest
141
 
142
    permissions:
143
      contents: write
144
 
145
    steps:
146
    - name: Checkout
147
      uses: actions/checkout@v4
148
    - name: Install packages
149
      run: sudo apt-get install mingw-w64
150
    - name: Make sure it is clean
151
      run: make clean PLATFORM=win64
152
    - name: Make
153
      run: make PLATFORM=win64
154
    - name: Rename
155
      run: cp BASIC/krakow.exe krakow-win64.exe
156
    - name: Upload artifact
157
      uses: actions/upload-artifact@v4
158
      with:
159
        name: build-win64
160
        path: krakow-win64.exe
161
 
19 nishi 162
  build-arduino:
163
    name: "Build for Arduino"
164
    runs-on: ubuntu-latest
165
 
166
    permissions:
167
      contents: write
168
 
169
    steps:
170
    - name: Checkout
171
      uses: actions/checkout@v4
172
    - name: Install packages
20 nishi 173
      run: sudo apt-get install gcc-avr avr-libc
19 nishi 174
    - name: Make sure it is clean
175
      run: make clean PLATFORM=arduino
176
    - name: Make
21 nishi 177
      run: make PLATFORM=arduino
19 nishi 178
    - name: Rename
179
      run: cp BASIC/krakow.hex krakow-arduino.hex
180
    - name: Upload artifact
181
      uses: actions/upload-artifact@v4
182
      with:
183
        name: build-arduino
184
        path: krakow-arduino.hex
185
 
30 nishi 186
  build-msx:
187
    name: "Build for MSX"
188
    runs-on: ubuntu-latest
189
 
190
    permissions:
191
      contents: write
192
 
193
    steps:
194
    - name: Checkout
195
      uses: actions/checkout@v4
196
    - name: Install packages
197
      run: sudo apt-get install sdcc
32 nishi 198
    - name: Add SDCC path to env
199
      run: echo "SDCC=/usr/share/sdcc" >> $GITHUB_ENV
30 nishi 200
    - name: Clone hex2bin
31 nishi 201
      run: git clone https://github.com/nishiowo/hex2bin
30 nishi 202
    - name: Build hex2bin
203
      run: rm -f hex2bin/hex2bin && make -C hex2bin
204
    - name: Add to PATH
205
      run: echo "$(pwd)/hex2bin" >> $GITHUB_PATH
206
    - name: Make sure it is clean
207
      run: make clean PLATFORM=msx
208
    - name: Make
209
      run: make PLATFORM=msx
210
    - name: Rename
211
      run: cp BASIC/krakow.msx.rom krakow-msx.rom
212
    - name: Upload artifact
213
      uses: actions/upload-artifact@v4
214
      with:
215
        name: build-msx
216
        path: krakow-msx.rom
217
 
16 nishi 218
  release:
219
    name: "Release"
220
    runs-on: ubuntu-latest
221
 
17 nishi 222
    permissions:
16 nishi 223
      contents: write
224
 
30 nishi 225
    needs: [build-c64, build-arduino, build-a800xl, build-pet, build-apple2, build-win32, build-win64, build-msx]
16 nishi 226
 
227
    steps:
228
    - name: Checkout
229
      uses: actions/checkout@v4
230
    - name: Download from build-c64
231
      uses: actions/download-artifact@v4
232
      with:
233
        name: build-c64
22 nishi 234
    - name: Download from build-a800xl
235
      uses: actions/download-artifact@v4
236
      with:
237
        name: build-a800xl
238
    - name: Download from build-pet
239
      uses: actions/download-artifact@v4
240
      with:
241
        name: build-pet
25 nishi 242
    - name: Download from build-apple2
243
      uses: actions/download-artifact@v4
244
      with:
245
        name: build-apple2
26 nishi 246
    - name: Download from build-win32
247
      uses: actions/download-artifact@v4
248
      with:
249
        name: build-win32
250
    - name: Download from build-win64
251
      uses: actions/download-artifact@v4
252
      with:
253
        name: build-win64
30 nishi 254
    - name: Download from build-msx
255
      uses: actions/download-artifact@v4
256
      with:
257
        name: build-msx
19 nishi 258
    - name: Download from build-arduino
259
      uses: actions/download-artifact@v4
260
      with:
261
        name: build-arduino
18 nishi 262
    - name: Delete old release
263
      run: gh release delete "$(make get-version)" --cleanup-tag -y || true
264
      env:
265
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
266
    - name: Release
30 nishi 267
      run: gh release create -t "v$(make get-version)" "$(make get-version)" krakow-c64.80 krakow-arduino.hex krakow-a800xl krakow-pet.prg krakow-apple2.dsk krakow-win32.exe krakow-win64.exe krakow-msx.rom -n "Version \`$(make get-version)\` was build in this release"
18 nishi 268
      env:
269
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}