Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1e4d165
Merge pull request #214 from AmigaLabs/development
walkero-gr Nov 26, 2024
c7750e1
Release v1.4.0 changes (#216)
github-actions[bot] Nov 26, 2024
127dae5
list lib files for release
walkero-gr Dec 17, 2024
6cb6559
Changed the compiling docker image
walkero-gr Dec 17, 2024
071b458
Removed Shared arg
walkero-gr Dec 17, 2024
c72b78c
Changes in GNUmakefile to revert a previous change and disable a fail…
walkero-gr Dec 17, 2024
2dd0b74
enabled again all the steps in the release action
walkero-gr Dec 17, 2024
06d5fd5
Test shared job steps
walkero-gr Dec 17, 2024
9af859b
Move the compile to actions
walkero-gr Dec 17, 2024
c3b8035
Put spe value into quotes
walkero-gr Dec 17, 2024
27bfff9
Added inputs in the action file
walkero-gr Dec 17, 2024
8bd4d23
More changes to make action work
walkero-gr Dec 17, 2024
11feb88
Removed if checks
walkero-gr Dec 17, 2024
7c807ca
Added the shell
walkero-gr Dec 17, 2024
e59bc07
Added spe build
walkero-gr Dec 17, 2024
f67fba4
use compile workflow
walkero-gr Dec 17, 2024
71983f4
moved the shared workflow to the workflows folder
walkero-gr Dec 17, 2024
43e82c6
removed names
walkero-gr Dec 17, 2024
abe7857
Moved inputs under workflow_call
walkero-gr Dec 17, 2024
9b4f63d
add type in inputs
walkero-gr Dec 17, 2024
ba828fc
A few changes to include more steps
walkero-gr Dec 17, 2024
7bcab08
Removed the secrets from workflow_call
walkero-gr Dec 17, 2024
d020312
Added shell in install-gh
walkero-gr Dec 17, 2024
3b7258d
Added more steps in release
walkero-gr Dec 17, 2024
ce3c41c
added a disabled os4depot release action
walkero-gr Dec 17, 2024
0450a57
Changed PR and merge workflows to use the compile action
walkero-gr Dec 17, 2024
65005fc
Merge pull request #218 from walkero-gr/include-.so-files-in-archive
afxgroup Dec 17, 2024
5e6d446
Merge branch 'master' into create-an-SPE-version-of-clib4
walkero-gr Dec 17, 2024
e256582
Added some fixes in the Discord message
walkero-gr Dec 17, 2024
3c1b993
Merge pull request #219 from walkero-gr/create-an-SPE-version-of-clib4
afxgroup Dec 17, 2024
62bfde3
Fixes for pr 219 (#221)
walkero-gr Dec 17, 2024
3f5b4d8
Fixes for pr 219 (#223)
walkero-gr Dec 17, 2024
5d728de
Fixes for pr 219 (#224)
walkero-gr Dec 17, 2024
45ee372
Release v1.4.1 changes (#225)
github-actions[bot] Dec 17, 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
28 changes: 28 additions & 0 deletions .github/actions/compile/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Compile clib4
description: "Compile clib4 with gcc for AmigaOS 4"

inputs:
spe:
description: 'Compile with SPE'
required: false
default: "no"
git_tag:
description: 'Git tag to use'
required: false

runs:
using: "composite"
steps:
- name: compiling
shell: bash
if: ${{ inputs.spe != 'yes' }}
run: |
cd /opt/code && \
make -j1 -f GNUmakefile.os4 OS=os4 GITTAG=${{ inputs.git_tag }}
- name: compiling SPE
shell: bash
if: ${{ inputs.spe == 'yes' }}
run: |
cd /opt/code && \
make -j1 -f GNUmakefile.os4 OS=os4 SPE=yes GITTAG=${{ inputs.git_tag }}
15 changes: 15 additions & 0 deletions .github/actions/install-gh/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Install GitHub CLI
description: "Install GitHub CLI binary"

runs:
using: "composite"
steps:
- name: Install GitHub CLI binary
shell: bash
run: |
mkdir -p -m 755 /etc/apt/keyrings \
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt update \
&& apt install gh -y
23 changes: 23 additions & 0 deletions .github/actions/os4depot-release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release to OS4Depot
description: "Release clib4 to OS4Depot"

# runs:
# using: "composite"
# steps:
# - name: Prepare OS4Depot release
# run: |
# mkdir os4depot-release
# cp clib4-${{ github.event.release.tag_name }}.lha ./os4depot-release/clib4.lha
# cp ./os4depot.readme ./os4depot-release/clib4_lha.readme
# sed -i "s/VERSION_TAG/${{ github.event.release.tag_name }}/" ./os4depot-release/os4depot.readme
# sed -i "s/OS4DEPOT_PASSPHRASE/${{ secrets.OS4DEPOT_PASSPHRASE }}/" ./os4depot-release/os4depot.readme

# - name: Release on OS4Depot
# uses: SamKirkland/FTP-Deploy-Action@v4.3.4
# with:
# server: os4depot.net
# port: 21
# username: ftp
# password:
# server-dir: ./upload
# local-dir: /opt/code/os4depot-release/
101 changes: 101 additions & 0 deletions .github/workflows/_compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Compile for PowerPC

on:
workflow_call:
inputs:
git_tag:
description: 'Git tag to use'
required: true
type: string
gcc:
description: 'GCC version to use'
required: true
default: 11
type: string
spe:
description: 'Compile with SPE'
required: false
default: "no"
type: string

env:
archive_name: clib4-${{ inputs.git_tag }}${{ inputs.spe == 'yes' && '_SPE' || '' }}

jobs:
compile:
runs-on: ubuntu-latest
container:
image: walkero/amigagccondocker:os4-gcc${{ inputs.gcc }}
volumes:
- '${{ github.workspace }}:/opt/code'
steps:
- name: Pull code
uses: actions/checkout@v4

- name: Add repository to git safe directories
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global --add safe.directory /opt/code
- name: Compile clib4
uses: ./.github/actions/compile
with:
git_tag: ${{ inputs.git_tag }}
spe: ${{ inputs.spe }}

- name: Create the LHA release archive
run: |
make -f GNUmakefile.os4 release && \
mv clib4.lha ${{ env.archive_name }}.lha
- name: Create the DEB release archive
run: |
make -f GNUmakefile.os4 dpkg DPKG_LIB=${{ env.archive_name }}_amd64
- name: Upload LHA release file in GitHub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: /opt/code/${{ env.archive_name }}.lha
asset_name: ${{ env.archive_name }}.lha
asset_content_type: application/x-lzh-compressed

- name: Install GitHub binary
uses: ./.github/actions/install-gh

- name: Upload DEB release file in GitHub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: /opt/code/${{ env.archive_name }}_amd64.deb
asset_name: ${{ env.archive_name }}_amd64.deb
asset_content_type: application/vnd.debian.binary-pac

- name: Upload DEB release file to the server
uses: kostya-ten/ssh-server-deploy@v4
with:
host: ${{ secrets.DEBSERVER_HOST }}
port: ${{ secrets.DEBSERVER_PORT }}
username: ${{ secrets.DEBSERVER_USERNAME }}
private_key: ${{ secrets.DEBSERVER_PRIVATE_KEY }}
scp_source: ${{ env.archive_name }}.deb
scp_target: /opt/amigarepo/ubuntu/pool/main
before_script: |
rm /opt/amigarepo/ubuntu/pool/main/${{ env.archive_name }}.deb
after_script: |
/root/regenerate-packages.sh
- name: Create Pull Request
if: ${{ inputs.spe == 'no' }}
id: cpr
uses: peter-evans/create-pull-request@v6
with:
commit-message: Release ${{ inputs.git_tag }} changes
branch: release/${{ inputs.git_tag }}
base: master
body: Automated changes as part of the release
title: Version files changes by the github bot
129 changes: 28 additions & 101 deletions .github/workflows/makeRelease.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Make a new release

on:
release:
branches:
Expand All @@ -7,106 +8,32 @@ on:
- published

jobs:
run:
name: Build latest code
compile-ppc:
name: Build for PowerPC cpus
uses: ./.github/workflows/_compile.yml
with:
git_tag: ${{ github.event.release.tag_name }}
gcc: 11
spe: "no"

compile-spe:
name: Build for PowerPC SPE cpus
uses: ./.github/workflows/_compile.yml
with:
git_tag: ${{ github.event.release.tag_name }}
gcc: 6
spe: "yes"

announcements:
needs: [compile-ppc, compile-spe]
name: Notify on Discord on successful release
runs-on: ubuntu-latest
container:
image: walkero/amigagccondocker:os4-gcc11-exp
volumes:
- '${{ github.workspace }}:/opt/code'
steps:
- name: Pull code
uses: actions/checkout@v4
- name: Add repository to git safe directories
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global --add safe.directory /opt/code
- name: Compile clib4
run: |
cd /opt/code && \
make -j1 -f GNUmakefile.os4 OS=os4 SHARED=no GITTAG=${{ github.event.release.tag_name }}
- name: Create the LHA release archive
run: |
make -f GNUmakefile.os4 release && \
mv clib4.lha clib4-${{ github.event.release.tag_name }}.lha
- name: Create the DEB release archive
run: |
make -f GNUmakefile.os4 dpkg DPKG_LIB=clib4-${{ github.event.release.tag_name }}_amd64
- name: Upload LHA release file in GitHub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: /opt/code/clib4-${{ github.event.release.tag_name }}.lha
asset_name: clib4-${{ github.event.release.tag_name }}.lha
asset_content_type: application/x-lzh-compressed
- name: Install gh binary
run: |
mkdir -p -m 755 /etc/apt/keyrings \
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt update \
&& apt install gh -y
- name: Upload DEB release file in GitHub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: /opt/code/clib4-${{ github.event.release.tag_name }}_amd64.deb
asset_name: clib4-${{ github.event.release.tag_name }}_amd64.deb
asset_content_type: application/vnd.debian.binary-pac
- name: Upload DEB release file to the server
uses: kostya-ten/ssh-server-deploy@v4
with:
host: ${{ secrets.DEBSERVER_HOST }}
port: ${{ secrets.DEBSERVER_PORT }}
username: ${{ secrets.DEBSERVER_USERNAME }}
private_key: ${{ secrets.DEBSERVER_PRIVATE_KEY }}
scp_source: clib4-${{ github.event.release.tag_name }}_amd64.deb
scp_target: /opt/amigarepo/ubuntu/pool/main
before_script: |
rm /opt/amigarepo/ubuntu/pool/main/clib4*.deb
after_script: |
/root/regenerate-packages.sh
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
commit-message: Release ${{ github.event.release.tag_name }} changes
branch: release/${{ github.event.release.tag_name }}
base: master
body: Automated changes as part of the release
title: Version files changes by the github bot
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash
# - name: Prepare OS4Depot release
# run: |
# mkdir os4depot-release
# cp clib4-${{ github.event.release.tag_name }}.lha ./os4depot-release/clib4.lha
# cp ./os4depot.readme ./os4depot-release/clib4_lha.readme
# sed -i "s/VERSION_TAG/${{ github.event.release.tag_name }}/" ./os4depot-release/os4depot.readme
# sed -i "s/OS4DEPOT_PASSPHRASE/${{ secrets.OS4DEPOT_PASSPHRASE }}/" ./os4depot-release/os4depot.readme
# - name: Release on OS4Depot
# uses: SamKirkland/FTP-Deploy-Action@v4.3.4
# with:
# server: os4depot.net
# port: 21
# username: ftp
# password:
# server-dir: ./upload
# local-dir: /opt/code/os4depot-release/
- name: Notify on Discord on successful release
uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.DISCORD_ANNOUNCEMENTS_ID }}
webhook_token: ${{ secrets.DISCORD_ANNOUNCEMENTS_TOKEN }}
message: "New release of clib4: **${{ github.event.release.tag_name }}** has been created. Check it out at: https://github.com/AmigaLabs/clib4/releases/tag/${{ github.event.release.tag_name }}"
username: GitHub Actions
avatar_url: "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"
- name: Notify on Discord on successful release
uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.DISCORD_ANNOUNCEMENTS_ID }}
webhook_token: ${{ secrets.DISCORD_ANNOUNCEMENTS_TOKEN }}
message: "New release of clib4: **${{ github.event.release.tag_name }}** has been created. Check it out at: https://github.com/AmigaLabs/clib4/releases/tag/${{ github.event.release.tag_name }}"
username: "GitHub Actions"
avatar_url: "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"
34 changes: 28 additions & 6 deletions .github/workflows/mergeMaster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,42 @@ on:
- closed

jobs:
run_if_merged:
compile-ppc:
name: Build for PowerPC cpus
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
name: Build latest code
container:
image: walkero/amigagccondocker:os4-gcc11
volumes:
- '${{ github.workspace }}:/opt/code'
steps:
- name: Pull code
uses: actions/checkout@v4

- name: Compile clib4
uses: ./.github/actions/compile
with:
spe: "no"

- name: Create the release archive
run: make -f GNUmakefile.os4 release

compile-spe:
name: Build for PowerPC SPE cpus
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
container:
image: walkero/amigagccondocker:os4-gcc11-exp
image: walkero/amigagccondocker:os4-gcc6
volumes:
- '${{ github.workspace }}:/opt/code'
steps:
- name: Pull code
uses: actions/checkout@v4

- name: Compile clib4
run: |
cd /opt/code && \
make -j1 -f GNUmakefile.os4 OS=os4 SHARED=no
uses: ./.github/actions/compile
with:
spe: "yes"

- name: Create the release archive
run: make -f GNUmakefile.os4 release
Loading