mirror of
https://github.com/json-c/json-c.git
synced 2026-11-07 06:00:16 +08:00
Add Amiga workflow
This commit is contained in:
1 parent
6a273c567b
commit
385c46ef39
2 files changed
+67
No files matched your search
@@ -0,0 +1,58 @@
|
||||
name: amiga
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
concurrency:
|
||||
group: ${{github.workflow}}-${{github.event.pull_request.number || github.ref}}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
package:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Ubuntu's `lha` package is lhasa: extract-only, cannot create archives.
|
||||
# Build LHa for UNIX (https://github.com/jca02266/lha) instead.
|
||||
- name: Install LHa for UNIX
|
||||
working-directory: ${{runner.temp}}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y autoconf automake
|
||||
curl -fsSL -o lha.tar.gz \
|
||||
https://github.com/jca02266/lha/archive/16619b066b189ef289bb8b07b37d1c38d550da99.tar.gz
|
||||
tar -xzf lha.tar.gz
|
||||
cd lha-16619b066b189ef289bb8b07b37d1c38d550da99
|
||||
autoreconf -is
|
||||
./configure --prefix="$HOME/.local"
|
||||
make -j"$(nproc)"
|
||||
make install
|
||||
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Check lha can create archives
|
||||
run: |
|
||||
command -v lha
|
||||
d=$(mktemp -d)
|
||||
echo probe > "$d/f"
|
||||
( cd "$d" && lha -aq2 t.lha f )
|
||||
test -s "$d/t.lha"
|
||||
|
||||
- name: Pull compiler images
|
||||
run: |
|
||||
docker pull sacredbanana/amiga-compiler:m68k-amigaos &
|
||||
docker pull sacredbanana/amiga-compiler:ppc-amigaos &
|
||||
docker pull sacredbanana/amiga-compiler:ppc-morphos &
|
||||
wait
|
||||
|
||||
- name: Build and package
|
||||
run: ./package-amiga.sh
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: json-c.lha
|
||||
path: dist/json-c.lha
|
||||
if-no-files-found: error
|
||||
Reference in new issue
Block a user