Skip to content

Commit

Permalink
fix CI and update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
adriweb committed Sep 26, 2024
1 parent f835d80 commit 1a32a2b
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 82 deletions.
57 changes: 19 additions & 38 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ on:

env:
AUTOTESTER_LIBS_GROUP: ${{github.workspace}}/toolchain/clibs.8xg
AUTOTESTER_ROM: ${{github.workspace}}/secrets/84pce_515_53.rom
AUTOTESTER_ROM: ${{github.workspace}}/secrets/83pce_515_530.rom
CEDEV: ${{github.workspace}}/CEdev
CEDEV_BIN: ${{github.workspace}}/CEdev/bin
CEDEV_EXAMPLES: ${{github.workspace}}/CEdev/examples
CEDEV_TEST: ${{github.workspace}}/toolchain/test
CEMU_PATH: ${{github.workspace}}/CEmu
FASMG_DOMAIN: https://flatassembler.net
FASMG_PATH: ${{github.workspace}}/fasmg
HOST_DOMAIN: https://jacobly.com
SECRETS_PATH: ${{github.workspace}}/secrets
TOOLCHAIN_PATH: ${{github.workspace}}/toolchain

Expand All @@ -32,39 +31,31 @@ jobs:
- nul: /dev/null
- runs-on: macos-latest
fasmg: /source/macos/x64/fasmg
ez80-bins-suffix: macOS_arm
- runs-on: windows-latest
fasmg: /fasmg.exe
ez80-bins-suffix: windows
env: "env:"
exe: .exe
nul: nul
ldflags: LDFLAGS="-static-libgcc -static-libstdc++ -static"
- runs-on: ubuntu-20.04
ez80-bins-suffix: ubuntu
fasmg: /fasmg.x64
runs-on: ${{matrix.runs-on}}
steps:
- name: Prepare Build Environment
run: cmake -E echo >> $${{matrix.env}}GITHUB_PATH ${{env.CEDEV_BIN}}

- name: Download ez80-clang
id: ez80-clang
- name: Download ez80-clang and ez80-link
id: ez80-bins
uses: carlosperate/[email protected]
with:
file-url: ${{env.HOST_DOMAIN}}/artifact?repo=llvm-project&branch=z80&file=ez80-clang${{matrix.exe}}-${{matrix.runs-on}}Release
file-url: https://github.com/CE-Programming/llvm-project/releases/download/nightly/ez80-clang-link_${{matrix.ez80-bins-suffix}}_nightly.zip
- name: Extract ez80-clang
uses: DuckSoft/[email protected]
with:
pathSource: ${{steps.ez80-clang.outputs.file-path}}
pathTarget: ${{env.CEDEV_BIN}}

- name: Download ez80-link
id: ez80-link
uses: carlosperate/[email protected]
with:
file-url: ${{env.HOST_DOMAIN}}/artifact?repo=llvm-project&branch=z80&file=ez80-link${{matrix.exe}}-${{matrix.runs-on}}Release
- name: Extract ez80-link
uses: DuckSoft/[email protected]
with:
pathSource: ${{steps.ez80-link.outputs.file-path}}
pathSource: ${{steps.ez80-bins.outputs.file-path}}
pathTarget: ${{env.CEDEV_BIN}}

- name: Download Fasmg Download Page
Expand Down Expand Up @@ -94,7 +85,7 @@ jobs:
run: cmake -E copy fasmg${{matrix.fasmg}} ${{env.CEDEV_BIN}}/fasmg${{matrix.exe}}

- name: Checkout CEmu
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{github.repository_owner}}/CEmu
ref: latest-stable
Expand All @@ -117,7 +108,7 @@ jobs:
fasmg ${{matrix.nul}} ${{matrix.nul}}
- name: Checkout Toolchain
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ${{env.TOOLCHAIN_PATH}}
submodules: recursive
Expand Down Expand Up @@ -145,7 +136,7 @@ jobs:
run: make -j4 -C ${{env.CEDEV_TEST}} COMPRESSED=${{matrix.compressed}} V=1

- name: Upload Test Build Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: "contains(github.event.head_commit.message, 'upload')"
with:
name: tests-${{runner.os}}-${{matrix.compressed}}
Expand All @@ -157,27 +148,18 @@ jobs:
run: make -j4 -C ${{env.CEDEV_EXAMPLES}} COMPRESSED=${{matrix.compressed}} V=1

- name: Upload Example Build Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: "contains(github.event.head_commit.message, 'upload')"
with:
name: examples-${{runner.os}}-${{matrix.compressed}}
path: ${{env.CEDEV_EXAMPLES}}

- name: Download Secrets
id: download-secrets
uses: carlosperate/[email protected]
with:
file-url: ${{env.HOST_DOMAIN}}/${{github.repository_owner}}/secrets
location: ${{env.SECRETS_PATH}}
- name: Decrypt Secrets
env:
KEY: ${{secrets.SYMMETRIC_KEY_256}}
run: openssl enc -d -aes-256-cbc -iv a581c6a54a2b51143fecad6794deb32a -K "$${{matrix.env}}KEY" -in ${{steps.download-secrets.outputs.file-path}} -out ${{env.SECRETS_PATH}}/secrets.7z
- name: Extract Secrets
uses: DuckSoft/[email protected]
- name: Download CI test secrets
uses: actions/checkout@v4
with:
pathSource: ${{env.SECRETS_PATH}}/secrets.7z
pathTarget: ${{env.SECRETS_PATH}}
repository: "CE-Programming/ci-test-secrets"
token: ${{ secrets.GH_PAT_CI_SECRETS }}
path: "secrets"

- name: Test Examples
if: runner.os != 'Windows'
Expand Down Expand Up @@ -230,13 +212,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Documentation Dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get install -y doxygen
cmake -E echo >> $${{matrix.env}}GITHUB_PATH $${{matrix.env}}HOME/.local/bin
- name: Checkout Toolchain
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ${{env.TOOLCHAIN_PATH}}
persist-credentials: false
Expand All @@ -248,6 +229,6 @@ jobs:
- name: Build Website Documentation
run: make -C ${{env.TOOLCHAIN_PATH}} docs
- name: Disable Jekyll
run: cmake -E touch ${{env.TOOLCHAIN_PATH}}/docs/build/html/.nojekyll
run: touch ${{env.TOOLCHAIN_PATH}}/docs/build/html/.nojekyll
- name: Remove .pickle files
run: find ${{env.TOOLCHAIN_PATH}}/docs/build/ -name '*.pickle' -delete
72 changes: 28 additions & 44 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ on:

env:
AUTOTESTER_LIBS_GROUP: ${{github.workspace}}/toolchain/clibs.8xg
AUTOTESTER_ROM: ${{github.workspace}}/secrets/84pce_515_53.rom
AUTOTESTER_ROM: ${{github.workspace}}/secrets/83pce_515_530.rom
CEDEV: ${{github.workspace}}/CEdev
CEDEV_BIN: ${{github.workspace}}/CEdev/bin
CEDEV_EXAMPLES: ${{github.workspace}}/CEdev/examples
CEDEV_TEST: ${{github.workspace}}/toolchain/test
CEMU_PATH: ${{github.workspace}}/CEmu
FASMG_DOMAIN: https://flatassembler.net
FASMG_PATH: ${{github.workspace}}/fasmg
HOST_DOMAIN: https://jacobly.com
SECRETS_PATH: ${{github.workspace}}/secrets
TOOLCHAIN_PATH: ${{github.workspace}}/toolchain

Expand All @@ -31,42 +30,34 @@ jobs:
- nul: /dev/null
- runs-on: macos-latest
fasmg: /source/macos/x64/fasmg
ez80-bins-suffix: macOS_arm
install-output-ext: "dmg"
- runs-on: windows-latest
fasmg: /fasmg.exe
ez80-bins-suffix: windows
env: "env:"
exe: .exe
nul: nul
ldflags: LDFLAGS="-static-libgcc -static-libstdc++ -static"
install-output-ext: "zip"
- runs-on: ubuntu-20.04
ez80-bins-suffix: ubuntu
fasmg: /fasmg.x64
install-output-ext: "tar.gz"
runs-on: ${{matrix.runs-on}}
steps:
- name: Prepare Build Environment
run: cmake -E echo >> $${{matrix.env}}GITHUB_PATH ${{env.CEDEV_BIN}}

- name: Download ez80-clang
id: ez80-clang
- name: Download ez80-clang and ez80-link
id: ez80-bins
uses: carlosperate/[email protected]
with:
file-url: ${{env.HOST_DOMAIN}}/artifact?repo=llvm-project&branch=z80&file=ez80-clang${{matrix.exe}}-${{matrix.runs-on}}Release
file-url: https://github.com/CE-Programming/llvm-project/releases/download/nightly/ez80-clang-link_${{matrix.ez80-bins-suffix}}_nightly.zip
- name: Extract ez80-clang
uses: DuckSoft/[email protected]
with:
pathSource: ${{steps.ez80-clang.outputs.file-path}}
pathTarget: ${{env.CEDEV_BIN}}

- name: Download ez80-link
id: ez80-link
uses: carlosperate/[email protected]
with:
file-url: ${{env.HOST_DOMAIN}}/artifact?repo=llvm-project&branch=z80&file=ez80-link${{matrix.exe}}-${{matrix.runs-on}}Release
- name: Extract ez80-link
uses: DuckSoft/[email protected]
with:
pathSource: ${{steps.ez80-link.outputs.file-path}}
pathSource: ${{steps.ez80-bins.outputs.file-path}}
pathTarget: ${{env.CEDEV_BIN}}

- name: Download Fasmg Download Page
Expand Down Expand Up @@ -96,7 +87,7 @@ jobs:
run: cmake -E copy fasmg${{matrix.fasmg}} ${{env.CEDEV_BIN}}/fasmg${{matrix.exe}}

- name: Checkout CEmu
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{github.repository_owner}}/CEmu
ref: latest-stable
Expand All @@ -119,7 +110,7 @@ jobs:
fasmg ${{matrix.nul}} ${{matrix.nul}}
- name: Checkout Toolchain
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ${{env.TOOLCHAIN_PATH}}
submodules: recursive
Expand Down Expand Up @@ -197,19 +188,21 @@ jobs:
cd ${{env.CEDEV}}/.. && 7z a -tzip CEdev-${{runner.os}}.${{matrix.install-output-ext}} CEdev
- name: Upload CEdev
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: CEdev-${{runner.os}}
path: CEdev-${{runner.os}}.${{matrix.install-output-ext}}

- name: Upload Libraries
uses: actions/upload-artifact@v2
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: clibs
path: ${{env.AUTOTESTER_LIBS_GROUP}}

- name: Upload Libraries Zip
uses: actions/upload-artifact@v2
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: clibs_separately_in_zip
path: ${{github.workspace}}/toolchain/clibs
Expand All @@ -231,7 +224,7 @@ jobs:
run: cmake -E echo >> $${{matrix.env}}GITHUB_PATH ${{env.CEDEV_BIN}}

- name: Download CEdev
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: CEdev-${{runner.os}}
path: ${{github.workspace}}
Expand All @@ -251,7 +244,7 @@ jobs:
# checkout only for test files -- contents should not be used otherwise.
- name: Checkout Toolchain
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ${{env.TOOLCHAIN_PATH}}
persist-credentials: false
Expand All @@ -266,24 +259,15 @@ jobs:
- name: Build Examples
run: make -j4 -C ${{env.CEDEV_EXAMPLES}} COMPRESSED=${{matrix.compressed}} V=1

- name: Download Secrets
id: download-secrets
uses: carlosperate/[email protected]
with:
file-url: ${{env.HOST_DOMAIN}}/${{github.repository_owner}}/secrets
location: ${{env.SECRETS_PATH}}
- name: Decrypt Secrets
env:
KEY: ${{secrets.SYMMETRIC_KEY_256}}
run: openssl enc -d -aes-256-cbc -iv a581c6a54a2b51143fecad6794deb32a -K "$${{matrix.env}}KEY" -in ${{steps.download-secrets.outputs.file-path}} -out ${{env.SECRETS_PATH}}/secrets.7z
- name: Extract Secrets
uses: DuckSoft/[email protected]
- name: Download CI test secrets
uses: actions/checkout@v4
with:
pathSource: ${{env.SECRETS_PATH}}/secrets.7z
pathTarget: ${{env.SECRETS_PATH}}
repository: "CE-Programming/ci-test-secrets"
token: ${{ secrets.GH_PAT_CI_SECRETS }}
path: "secrets"

- name: Download Libraries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: clibs
path: ${{env.TOOLCHAIN_PATH}}
Expand Down Expand Up @@ -343,7 +327,7 @@ jobs:
cmake -E echo >> $${{matrix.env}}GITHUB_PATH $${{matrix.env}}HOME/.local/bin
- name: Checkout Toolchain
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ${{env.TOOLCHAIN_PATH}}
persist-credentials: false
Expand Down Expand Up @@ -380,22 +364,22 @@ jobs:

steps:
- name: Download CEdev Linux
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: CEdev-Linux
path: ${{github.workspace}}
- name: Download CEdev Windows
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: CEdev-Windows
path: ${{github.workspace}}
- name: Download CEdev macOS
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: CEdev-macOS
path: ${{github.workspace}}
- name: Download CE Libraries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: clibs
path: ${{github.workspace}}
Expand Down

0 comments on commit 1a32a2b

Please sign in to comment.