Skip to content

Commit 96ef2b4

Browse files
committed
reworked build & release procedure + repository cleanup
1 parent 96eafec commit 96ef2b4

210 files changed

Lines changed: 405 additions & 24461 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/HOWTO.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
You can test GitHub Actions workflows locally using [`act`](https://nektosact.com/) and [Docker](https://www.docker.com/):
22

33
```shell
4-
act --container-architecture linux/amd64
4+
act --container-architecture linux/amd64 -W '.github/workflows/prepare-release-pr.yml'
5+
act --container-architecture linux/amd64 -W '.github/workflows/release.yml'
56
```

.github/workflows/prepare-release-pr.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313
prepare-release-pr:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- name: Check out sources
17+
uses: actions/checkout@v4
1718
with:
1819
fetch-depth: 0 # Need full history for changelog
1920

@@ -50,11 +51,11 @@ jobs:
5051
--tag ${{ steps.version.outputs.version }} \
5152
--output CHANGELOG.md
5253
53-
- name: Generate changelog preview
54-
id: changelog_preview
54+
- name: Generate release notes preview
55+
id: release_notes_preview
5556
run: |
5657
{
57-
echo 'output<<EOF'
58+
echo 'release_notes<<EOF'
5859
git cliff --config .github/cliff.toml \
5960
--tag ${{ steps.version.outputs.version }} \
6061
--unreleased
@@ -80,6 +81,6 @@ jobs:
8081
8182
# Release notes
8283
83-
${{ steps.changelog_preview.outputs.output }}
84+
${{ steps.release_notes_preview.outputs.release_notes }}
8485
labels: release
8586
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- VERSION
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
release:
15+
name: Build and Publish Release
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Check out sources
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Install dependencies
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y \
28+
make 64tass \
29+
python3 python3-pip
30+
31+
- name: Read the release version
32+
id: read_version
33+
run: |
34+
VERSION="$(cat VERSION | tr -d '\r\n')"
35+
if [ -z "$VERSION" ]; then
36+
echo "VERSION file is empty."
37+
exit 1
38+
fi
39+
echo "version=$VERSION" >> $GITHUB_OUTPUT
40+
echo "Version is $VERSION"
41+
42+
- name: Build the release
43+
run: |
44+
make -C source -B release V=1
45+
46+
- name: Create release archive
47+
id: release_archive
48+
run: |
49+
VERSION="${{ steps.read_version.outputs.version }}"
50+
PKG="superbasic-v${VERSION}"
51+
mkdir -p dist/"$PKG"
52+
cp -a .release/. dist/"$PKG"/
53+
cd dist && zip -r "$PKG.zip" "$PKG"
54+
echo "archive=dist/$PKG.zip" >> $GITHUB_OUTPUT
55+
56+
- name: Generate release notes
57+
id: release_notes
58+
run: |
59+
{
60+
echo 'release_notes<<EOF'
61+
git cliff --config .github/cliff.toml \
62+
--tag ${{ steps.read_version.outputs.version }} \
63+
--unreleased
64+
echo 'EOF'
65+
} >> $GITHUB_OUTPUT
66+
67+
- name: Create GitHub release
68+
uses: softprops/action-gh-release@v2
69+
with:
70+
tag_name: v${{ steps.read_version.outputs.version }}
71+
name: v${{ steps.read_version.outputs.version }}
72+
target_commitish: ${{ github.sha }}
73+
body: ${{ steps.release_notes.outputs.release_notes }}
74+
draft: true
75+
fail_on_unmatched_files: true
76+
files: |
77+
${{ steps.release_archive.outputs.archive }}
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
.DS_Store
22
__pycache__
33
.build
4+
.release
5+
dist
6+
**/generated/timestamp.asm

LICENSE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
MIT License
22

33
Copyright (c) 2022 paulscottrobson
4+
Copyright (c) 2025-present Aleksey Gurtovoy
5+
Copyright (c) SuperBASIC contributors (https://github.com/FoenixRetro/f256-superbasic/graphs/contributors)
46

57
Permission is hereby granted, free of charge, to any person obtaining a copy
68
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,29 @@
11
# F256 SuperBASIC
2-
Improved BASIC for F256 Junior
3-
4-
### Usage
2+
Improved BASIC for the F256 computers.
53

4+
## Usage
65
SuperBASIC Reference Manual PDF:
76
[reference/source/f256jr_basic_ref.pdf](reference/source/f256jr_basic_ref.pdf)
87

9-
### Developing
8+
## Local development
109
You need Make, Python and 64tass assembler on your machine.
1110

12-
You will also need a few repos besides SuperBASIC.
13-
SuperBASIC is fully intended to work with the _latest_ Kernel/DOS.
14-
1511
### Building
1612
```
17-
git clone git@github.com:FoenixRetro/f256-superbasic.git
18-
git clone git@github.com:WartyMN/Foenix-F256JR-bootscreens.git
19-
git clone git@github.com:FoenixRetro/f256-microkernel
20-
git clone git@github.com:FoenixRetro/FoenixMgr
21-
cd f256-superbasic/source
13+
# all the builds are done from the `source` directory
14+
cd source
2215
23-
# this will build everything against/including latest kernel
24-
make -B pullkernel updatekernel build release
16+
# full rebuild, pulls latest kernel and bootscreens
17+
make -B updatekernel updateassets build
2518
26-
# or just build basic
27-
make -B basic release
19+
# standard development build
20+
make -B build
2821
29-
# build w/ support for Gen 2 features
30-
make -B basic release HARDWARE_GEN=2
22+
# development build for F256Jr2/K2 hardware
23+
make -B build HARDWARE_GEN=2
3124
```
3225

33-
This will output a set of binary files in the `release/` folder
34-
and a file called `release/bulk.csv` that shows where those files
35-
get flashed in memory.
26+
The build output is stored in the `.build` directory at the repository root.
3627

3728
### Testing
3829

@@ -47,8 +38,8 @@ you can run the following commands to test your build in MAME F256K:
4738

4839
```
4940
cd mame
50-
cp -f ../f256-superbasic/source/release/sb*.bin roms/f256k/ # copy over SuperBASIC ROMs
51-
./f256 f256 -window -resolution 1280x960 # run the emulator
41+
cp -f ../f256-superbasic/.build/sb*.bin roms/f256k/ # copy over SuperBASIC ROMs
42+
./f256 f256 -window -resolution 1280x960 # run the emulator
5243
```
5344

5445
Note that because MAME embeds CRC checksums for all ROMs, you'll see warnings similar to
@@ -77,7 +68,7 @@ try out your build using the `--flash-bulk` command.
7768

7869
Example on Mac:
7970
```
80-
❯ cd release
71+
❯ cd .build
8172
❯ python3 ~/FoenixMgr/fnxmgr.py --port /dev/cu.usbmodemR23963534611 --flash-bulk bulk.csv
8273
Attempting to program sector 0x3F with lockout.bin
8374
Binary file uploaded...
@@ -87,12 +78,18 @@ Attempting to program sector 0x01 with sb01.bin
8778
...
8879
```
8980

81+
### Releasing a new version
82+
To ensure quality and reproducibility, official releases are handled through GitHub workflows.
83+
84+
The [release PR preparation](/.github/workflows/prepare-release-pr.yml) workflow monitors pushes to `main` and automatically creates or updates [a release PR](https://github.com/FoenixRetro/f256-superbasic/pulls?q=is%3Apr+is%3Aopen+label%3Arelease) that includes all unreleased changes. This PR includes a log of contributions and is assigned a version based on the major and minor numbers in [`source/Makefile`](/source/Makefile), with the patch number determined by the date of the latest contribution.
85+
86+
Merging the release PR updates the [`VERSION`](/VERSION) and [`CHANGESET.md`](/CHANGESET.md) files, then triggers the [final release](/.github/workflows/release.yml) workflow, which publishes the GitHub release.
9087

9188
### Additional References
9289

9390
- [F256 Documentation Wiki](https://wiki.f256foenix.com)
9491
- [More information on flashing SuperBASIC to your machine](https://wiki.f256foenix.com/index.php?title=Kernel_%26_SuperBASIC_Updates)
9592
- [More information on MAME for F256](https://wiki.f256foenix.com/index.php?title=Emulation#MAME)
9693
- [F256 MicroKernel](https://github.com/FoenixRetro/f256-microkernel)
97-
- [F256 Boot Screens](https://github.com/WartyMN/Foenix-F256JR-bootscreens)
94+
- [F256 Boot Screens](https://github.com/FoenixRetro/f256-bootscreens)
9895
- [F256 Command Line USB upload tool](https://github.com/pweingar/FoenixMgr)

TODO

Lines changed: 0 additions & 12 deletions
This file was deleted.

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.2024-02-11

bin/basic.rom

-28.2 KB
Binary file not shown.

bin/fnxmgr.zip

8.71 KB
Binary file not shown.

0 commit comments

Comments
 (0)