Subversion Repositories Krakow BASIC

Rev

Rev 26 | Rev 31 | Go to most recent revision | 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
103
      run: wget http://f.nishi.boats/f/g/master.dsk -O master.dsk
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
198
    - name: Clone hex2bin
199
      run: git clone https://github.com/algodesigner/hex2bin
200
    - name: Build hex2bin
201
      run: rm -f hex2bin/hex2bin && make -C hex2bin
202
    - name: Add to PATH
203
      run: echo "$(pwd)/hex2bin" >> $GITHUB_PATH
204
    - name: Make sure it is clean
205
      run: make clean PLATFORM=msx
206
    - name: Make
207
      run: make PLATFORM=msx
208
    - name: Rename
209
      run: cp BASIC/krakow.msx.rom krakow-msx.rom
210
    - name: Upload artifact
211
      uses: actions/upload-artifact@v4
212
      with:
213
        name: build-msx
214
        path: krakow-msx.rom
215
 
16 nishi 216
  release:
217
    name: "Release"
218
    runs-on: ubuntu-latest
219
 
17 nishi 220
    permissions:
16 nishi 221
      contents: write
222
 
30 nishi 223
    needs: [build-c64, build-arduino, build-a800xl, build-pet, build-apple2, build-win32, build-win64, build-msx]
16 nishi 224
 
225
    steps:
226
    - name: Checkout
227
      uses: actions/checkout@v4
228
    - name: Download from build-c64
229
      uses: actions/download-artifact@v4
230
      with:
231
        name: build-c64
22 nishi 232
    - name: Download from build-a800xl
233
      uses: actions/download-artifact@v4
234
      with:
235
        name: build-a800xl
236
    - name: Download from build-pet
237
      uses: actions/download-artifact@v4
238
      with:
239
        name: build-pet
25 nishi 240
    - name: Download from build-apple2
241
      uses: actions/download-artifact@v4
242
      with:
243
        name: build-apple2
26 nishi 244
    - name: Download from build-win32
245
      uses: actions/download-artifact@v4
246
      with:
247
        name: build-win32
248
    - name: Download from build-win64
249
      uses: actions/download-artifact@v4
250
      with:
251
        name: build-win64
30 nishi 252
    - name: Download from build-msx
253
      uses: actions/download-artifact@v4
254
      with:
255
        name: build-msx
19 nishi 256
    - name: Download from build-arduino
257
      uses: actions/download-artifact@v4
258
      with:
259
        name: build-arduino
18 nishi 260
    - name: Delete old release
261
      run: gh release delete "$(make get-version)" --cleanup-tag -y || true
262
      env:
263
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
264
    - name: Release
30 nishi 265
      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 266
      env:
267
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}