diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d4fdf2d..046a98b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 ] @@ -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 @@ -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 @@ -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: | @@ -129,9 +197,19 @@ 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 @@ -139,6 +217,7 @@ jobs: 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 @@ -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 diff --git a/.gitignore b/.gitignore index 95d5715..839f4be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ data/ -build/ \ No newline at end of file +build/ +bpmtmp/ +package/ \ No newline at end of file diff --git a/VERSION b/VERSION index 2cf03e5..53bb8b1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2024.1 \ No newline at end of file +2024.4 \ No newline at end of file diff --git a/bpm.tml b/bpm.tml new file mode 100644 index 0000000..746a905 --- /dev/null +++ b/bpm.tml @@ -0,0 +1,18 @@ +[package] +name = "file" +version = "2024.4" +authors = [ "nobody@nobody.fr",] +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] diff --git a/docs/md2hlp.cfg b/docs/md2hlp.cfg index b382254..6fc283d 100644 --- a/docs/md2hlp.cfg +++ b/docs/md2hlp.cfg @@ -1,36 +1,20 @@ [DEFAULT] -; -; Default options -; -Version = 2 -Break on hyphens = True - -Head = ^A -Paragraph = -Initial Indent = _ -Subsequent Indent = _ -Align = -List = - +version = 2 +break on hyphens = True +head = ^A +paragraph = +initial indent = _ +subsequent indent = _ +align = +list = quote block = _^@^W - -#bold = ^@^W,^G^P bold = ^T, ^P - italic = ^C,^G underline = ^F,^G strike_through = ^E,^G - -#quote = ^@^V,^G^P quote = ^v,^v - -# Orix n'a pas le jeu de caracteres graphiques -#cite = ^IJ^H, cite = _|, - - link = ^T,^P - ink_black = ^@ ink_red = ^A ink_green = ^B @@ -39,13 +23,11 @@ ink_blue = ^D ink_purple = ^E ink_cyan = ^F ink_white = ^G - simple_height = ^H simple_graph = ^I double_height = ^J blink_simple = ^L blink_double = ^N - paper_black = ^P paper_red = ^Q paper_green = ^R @@ -55,77 +37,37 @@ paper_purple = ^U paper_cyan = ^V paper_white = ^W - -; ============================================================================== - - - [Heading1] -; -; Default for Heading 1 -; -Head = __^J ^Q_Shell 2022.2 ^P___ +head = __^J ^Q_file 2024.4 ^P___ + [Heading3] -; -; Default for Heading 3 -; -Head = ^L^C -Align = ^ - - - -; ============================================================================== - - +head = ^L^C +align = ^ [SYNOPSYS] -; -; Defaults for SYNOPSYS section -; -Initial Indent = ________ -Paragraph = ^B -List = ^B - - +initial indent = ________ +paragraph = ^B +list = ^B [DESCRIPTION] -; -; Defaults for DESCRIPTION section -; -Initial Indent = ______ -Subsequent Indent = __ +initial indent = ______ +subsequent indent = __ [OPTIONS] -; Defaults for OPTIONS section -; -Initial Indent = __^B -Subsequent Indent = __^B -List = ^A - +initial indent = __^B +subsequent indent = __^B +list = ^A [EXAMPLES] -; -; Defaults for EXAMPLES section -; -Initial Indent = ________ -Paragraph = ^B -List = ^B - - +initial indent = ________ +paragraph = ^B +list = ^B [NOTES] -; -; Defaults for NOTES section -; - - [SOURCE] -; -; Defaults for SOURCE section -; -Break on hyphens = False -Initial Indent = '^F ' -Subsequent Indent = '^F' +break on hyphens = False +initial indent = '^F ' +subsequent indent = '^F' diff --git a/src/file b/src/file new file mode 100644 index 0000000..b998f8d Binary files /dev/null and b/src/file differ diff --git a/src/version.h b/src/version.h index f92673e..4f940d3 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define VERSION "2024.1" +#define VERSION "2024.4"