Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #8

Open
wants to merge 90 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
b594b22
fix
jedeoric Oct 17, 2024
93c6984
test
jedeoric Oct 20, 2024
781a63d
fix
jedeoric Oct 20, 2024
a7d0a65
fix space
jedeoric Oct 20, 2024
e7548d2
test
jedeoric Oct 20, 2024
66f3fcc
Fix ci
jedeoric Oct 20, 2024
1fd2dd7
fix
jedeoric Oct 20, 2024
a39d14a
fix
jedeoric Oct 20, 2024
453db1b
fix
jedeoric Oct 20, 2024
a752b44
test
jedeoric Oct 22, 2024
ea35d6c
test2
jedeoric Oct 22, 2024
b514144
test3
jedeoric Oct 22, 2024
d8a6859
test4
jedeoric Oct 22, 2024
46ee183
test
jedeoric Oct 22, 2024
1498096
fix
jedeoric Oct 22, 2024
5f8db26
fix
jedeoric Oct 22, 2024
3aca43e
fix
jedeoric Oct 22, 2024
ab2bd92
fix
jedeoric Oct 22, 2024
89e6e0e
test
jedeoric Oct 22, 2024
b9c5946
fss
jedeoric Oct 22, 2024
6e1f176
fix
jedeoric Oct 22, 2024
a6ea7a4
test
jedeoric Oct 22, 2024
99eccbc
fix
jedeoric Oct 22, 2024
fcc89b6
fix
jedeoric Oct 22, 2024
9969fe9
test
jedeoric Oct 22, 2024
b32875a
test
jedeoric Oct 22, 2024
da348d3
fix
jedeoric Oct 22, 2024
d6f3dd8
fix
jedeoric Oct 22, 2024
d55baba
fix
jedeoric Oct 22, 2024
7b87a8a
test
jedeoric Oct 22, 2024
58ef384
fix
jedeoric Oct 22, 2024
382603f
disable cache bpm
jedeoric Oct 22, 2024
6949e39
fix
jedeoric Oct 22, 2024
31635da
fix
jedeoric Oct 23, 2024
f3f4313
fix
jedeoric Oct 23, 2024
3bf67aa
fix/test
jedeoric Oct 23, 2024
1d657ee
test
jedeoric Oct 23, 2024
ab5e3aa
test
jedeoric Oct 23, 2024
ab5ab8d
fix
jedeoric Oct 23, 2024
c161e2f
fix
jedeoric Oct 23, 2024
eefd90f
fix
jedeoric Oct 23, 2024
dcc0eb1
fix
jedeoric Oct 23, 2024
3ad6192
test
jedeoric Oct 23, 2024
f70209c
test
jedeoric Oct 23, 2024
bc3ebbf
test
jedeoric Oct 24, 2024
46f7178
fix
jedeoric Oct 24, 2024
5407d2f
test2
jedeoric Oct 24, 2024
dc2aa5e
test
jedeoric Oct 24, 2024
894d3a2
fix
jedeoric Oct 24, 2024
f148538
test
jedeoric Oct 24, 2024
fd761e6
fix
jedeoric Oct 24, 2024
3ef4942
fix
jedeoric Oct 24, 2024
7dfc2e7
fix
jedeoric Oct 24, 2024
e7eca80
fix
jedeoric Oct 24, 2024
b76fa3e
fix
jedeoric Oct 24, 2024
5cd8556
fix
jedeoric Oct 24, 2024
03c214c
test
jedeoric Oct 24, 2024
f491529
test
jedeoric Oct 24, 2024
ec16587
test
jedeoric Oct 24, 2024
aee1810
fix
jedeoric Oct 24, 2024
badd22b
fix
jedeoric Oct 24, 2024
4dfe80f
test
jedeoric Oct 24, 2024
3fadb80
fix
jedeoric Oct 24, 2024
cbf3038
fix
jedeoric Oct 26, 2024
ab1f254
fix
jedeoric Oct 26, 2024
ddd6f7e
fix
jedeoric Oct 26, 2024
35d531c
test
jedeoric Oct 26, 2024
77e11cd
fix
jedeoric Oct 26, 2024
0ccedaf
fix
jedeoric Oct 26, 2024
7d7bdf9
fix
jedeoric Oct 26, 2024
938d8e5
fix
jedeoric Oct 26, 2024
ac56bff
fix
jedeoric Oct 26, 2024
44fb5dd
fix
jedeoric Oct 26, 2024
3cb6537
fix
jedeoric Oct 26, 2024
a191653
fix
jedeoric Oct 26, 2024
5902def
fix bpm
jedeoric Oct 26, 2024
268fbae
fix test
jedeoric Oct 28, 2024
1e8bae3
fix
jedeoric Oct 28, 2024
95b155d
fix
jedeoric Oct 28, 2024
344d80f
fix
jedeoric Oct 28, 2024
f3957b0
fix
jedeoric Oct 28, 2024
fb84d34
fix
jedeoric Oct 28, 2024
087ae8e
fix
jedeoric Oct 28, 2024
97265da
test
jedeoric Oct 28, 2024
7ffae9b
fix
jedeoric Oct 28, 2024
3b7f61a
fix
jedeoric Oct 28, 2024
1e46953
fix
jedeoric Oct 28, 2024
b00e4bd
fix test
jedeoric Oct 28, 2024
fe78788
fix/Test
jedeoric Oct 28, 2024
4763bfc
fix
jedeoric Oct 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 110 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: build

# Controls when the action will run.
# Controls when the action will run.
on:
# Triggers the workflow on push event only for all branches
push:
branches: [ main, master, develop ]
# branches: [ main, master ]
#pull_request:
# branches: [ main, master ]

Expand All @@ -14,37 +14,46 @@ on:
jobs:
# This workflow contains a single job called "build"
setup-sdk:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Cache sdk
id: cache-sdk
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
cc65/**/*
orix-sdk/**/*
md2hlp/**/*
orix-software/**/*
key: ${{ secrets.CACHE_ID }}-orix-sdk_
bpm/**/*
oricutron/**/*
key: ${{ secrets.CACHE_ID }}-orix-sdk

- name: Checkout cc65
if: steps.cache-sdk.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: cc65/cc65
path: cc65

- name: Checkout bpm
#if: steps.cache-sdk.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: orix-software/bpm
path: bpm

- name: Checkout orix-sdk
if: steps.cache-sdk.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: assinie/orix-sdk
path: orix-sdk

- name: Checkout md2hlp
if: steps.cache-sdk.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: assinie/md2hlp
path: md2hlp
Expand All @@ -68,6 +77,14 @@ jobs:
echo "src/include" >> .git/info/sparse-checkout
git checkout

- name: Prepare environment for oricutron
if: steps.cache-sdk.outputs.cache-hit != 'true'
run: |
sudo apt-get install -y xvfb libgtk-3-0 libgtk-3-dev libsdl1.2debian libsdl1.2-dev
git clone https://github.com/pete-gordon/oricutron.git
cd oricutron && make && pwd && cd .. && ls -l && echo ${GITHUB_WORKSPACE}
echo Timeout oricutron : ${secret}.TMOUT_ORICUTRON

- name: Compile orix-sdk
if: steps.cache-sdk.outputs.cache-hit != 'true'
working-directory: orix-sdk
Expand All @@ -83,43 +100,94 @@ jobs:
build:
# The type of runner that the job will run on
needs: setup-sdk
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.job_vars.outputs.VERSION }}
repo_name: ${{ steps.job_vars.outputs.REPO_NAME }}
bpm_found: ${{ steps.bpm_upload.outputs.BPM_FOUND }}

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/checkout@v3

- name: Set job variables
id: job_vars
run: |
echo "::set-output name=VERSION::$(cat VERSION)"
echo "::set-output name=REPO_NAME::${GITHUB_REPOSITORY##*/}"
echo "VERSION=$(cat VERSION)" >> $GITHUB_OUTPUT
echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT

- name: Install sdk
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
cc65/**/*
orix-sdk/**/*
md2hlp/**/*
orix-software/**/*
key: ${{ secrets.CACHE_ID }}-orix-sdk_
bpm/**/*
oricutron/**/*
key: ${{ secrets.CACHE_ID }}-orix-sdk

- name: Prepare environment for project
run: mv cc65 ../ && mv orix-software ../ && mv orix-sdk ../ && mv md2hlp ../
run: |
mkdir ~/bin
cd bpm && pip install -r requirements.txt && cd ..
# cp bpm/src/bpm ~/bin
# chmod 755 ~/bin/bpm && export PATH=$PATH:~/bin
ls -l && ls -l .. && ls -l ~/bin/ && mv cc65 ../ && mv orix-software ../ && mv orix-sdk ../ && mv md2hlp ../ && mv bpm ../

- name: Compile project
run: CC65_HOME=${GITHUB_WORKSPACE}/../cc65 make
run: |
if [ -f "bpm.tml" ]; then
ls -l ${GITHUB_WORKSPACE}
ls -l ${GITHUB_WORKSPACE}/oricutron
echo "Workspace : ${GITHUB_WORKSPACE}"
CC65_HOME=${GITHUB_WORKSPACE}/../cc65
echo "../bpm/src/bpm" >> $GITHUB_PATH
echo ${GITHUB_WORKSPACE}/../cc65/bin >> $GITHUB_PATH
export PATH=$PATH:../bpm/src/:${GITHUB_WORKSPACE}/../cc65/bin
chmod 755 ../bpm/src/bpm
echo "/home/runner/work/file/cc65/bin" >> $GITHUB_PATH
echo "Bpm version :"
bpm --force-update -V
bpm --force-update -V
echo Using bpm ...
bpm --force-update plugins install orixsdk
bpm --force-update build
else
CC65_HOME=${GITHUB_WORKSPACE}/../cc65 make
fi

- name: Unit-test with oricutron
run: |
echo "Workspace : ${GITHUB_WORKSPACE}"
echo Checking if there is unit tests
if [ -d "tests/build/" ] && [ "$(ls -A tests/build/)" ]; then
echo "########################################################"
echo "# Unit tests found : Starting Oricutron with tests #"
echo "########################################################"
git clone https://github.com/orix-software/docker-unit-test.git
cd docker-unit-test && bash install.sh ${GITHUB_WORKSPACE} && cd ..
echo "Tests found, let's start"
cp tests/build/* > ${GITHUB_WORKSPACE}/oricutron/sdcard/BIN
echo "#!/bin/submit\n" > ${GITHUB_WORKSPACE}/oricutron/sdcard/ETC/AUTOBOOT
cp tests/run.sub >> ${GITHUB_WORKSPACE}/oricutron/sdcard/ETC/AUTOBOOT
cd ${GITHUB_WORKSPACE}/oricutron
echo "Start Oricutron"
timeout --preserve-status 10 ./xvfb.sh || exit 0
fi

- name: Check unit-test
run: |
if [ -d "tests/build/" ] && [ "$(ls -A tests/build/)" ]; then
ls -l ${GITHUB_WORKSPACE}/oricutron/sdcard/
bash tests/unit-tests/verify.sh ${GITHUB_WORKSPACE}/oricutron/sdcard/
fi

- name: List build directory content
run: ls -lR build

- name: Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ steps.job_vars.outputs.REPO_NAME }}
path: |
Expand All @@ -129,16 +197,27 @@ jobs:
- name: Post compilation
run: mv ../cc65 . && mv ../orix-software . && mv ../orix-sdk . && mv ../md2hlp .

- name: Upload if bpm
id: bpm_upload
run: |
if [ -f "bpm.tml" ]; then
export BPM_PUBLISH_KEY=$hash
export PATH=$PATH:../bpm/src/:${GITHUB_WORKSPACE}/../cc65/bin
if [ "$BRANCH_NAME" = "master" -o "$BRANCH_NAME" = "main" ]; then bpm --force-update -V;--force-update publish --official; else bpm publish --alpha; fi
echo "BPM_FOUND=True" >> $GITHUB_OUTPUT
fi

upload:
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
defaults:
run:
shell: bash
env:
hash: ${{ secrets.HASH }}
version: ${{ needs.build.outputs.version }}
repo_name: ${{ needs.build.outputs.repo_name }}
BPM_FOUND: ${{ needs.build.outputs.bpm_found }}

steps:
- name: Get branch name
Expand All @@ -157,17 +236,23 @@ jobs:
# On pourrait faire l'extraction directement à la racine si VERSION est dans l'artifact
- name: Download Artifact
id: download
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: ${{ needs.build.outputs.repo_name }}
path: artifact

- name: Make archive
working-directory: ${{steps.download.outputs.download-path}}
run: tar -zcvf $GITHUB_WORKSPACE/$ARCHIVE_NAME *
run: |
echo "Use tar for archive"
tar -zcvf $GITHUB_WORKSPACE/$ARCHIVE_NAME *

- name: Upload to oric
run: |
if [ "$BRANCH_NAME" = "master" -o "$BRANCH_NAME" = "main" ]; then VERSION="$version"; else VERSION=alpha ; fi
curl -X POST --data-binary "@${ARCHIVE_NAME}" "https://cdn.oric.org/publish.php?hash=$hash&path=/home/oricoujr/www/ftp/orix/dists/$VERSION/tgz/6502/${ARCHIVE_NAME}"

echo BPM $BPM_FOUND
if [ "$BPM_FOUND" != "True" ]; then
if [ "$BRANCH_NAME" = "master" -o "$BRANCH_NAME" = "main" ]; then VERSION="$version"; else VERSION=alpha; fi
curl -X POST --data-binary "@${ARCHIVE_NAME}" "https://cdn.oric.org/publish.php?hash=$hash&path=/home/oricoujr/www/ftp/orix/dists/$VERSION/tgz/6502/${ARCHIVE_NAME}"
else
echo "Skipped, already sent with bpm"
fi
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
data/
build/
build/
bpmtmp/
package/
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024.1
2024.4
18 changes: 18 additions & 0 deletions bpm.tml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "file"
version = "2024.4"
authors = [ "[email protected]",]
license = "MIT OR Apache-2.0"
edition = "2018"
cpu = "6502"
readme = ""
repository = ""
documentation = ""
description = ""
homepage = ""
buildfolder = "build"
packagetype = "tgz"
codetype = "bin"
oricutron_replace_autoboot_run = "False"

[dependencies]
Loading
Loading