Skip to content

Commit

Permalink
convert action into container
Browse files Browse the repository at this point in the history
  • Loading branch information
andy5995 committed Feb 12, 2024
1 parent 0715f21 commit 8b7e9b9
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 86 deletions.
137 changes: 68 additions & 69 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- '**test.yml'

env:
VERSION: action-test
VERSION: container-test

jobs:
test-rmw:
Expand All @@ -26,30 +26,24 @@ jobs:
matrix:
platform: ['amd64', 'arm64', 'arm/v7']
steps:
- name: Checkout
- name: Checkout rmw
uses: actions/checkout@v4
- name: Use action from self
uses: ./
with:
platform: ${{ matrix.platform }}
dependency_commands: |
export -p
sudo apt install -y libncursesw5-dev
build_commands: |
git clone --depth 1 https://github.com/theimpossibleastronaut/rmw
cd rmw
meson setup _build -Dprefix=/usr
cd _build
ninja
install_to_appdir_commands: |
meson install --destdir=$APPDIR --skip-subprojects
linuxdeploy_output_version: $VERSION
linuxdeploy_args: |
-d rmw/packaging/rmw.desktop \
--icon-file=rmw/packaging/rmw_icon_32x32.png \
--icon-filename=rmw \
--executable=$APPDIR/usr/bin/rmw \
-o appimage
repository: theimpossibleastronaut/rmw

- if: ${{ inputs.platform != 'amd64' }}
uses: docker/setup-qemu-action@v3

- name Build project and AppImage
run: |
docker run \
-t --rm \
--platform linux/${{ matrix.platform }} \
-e VERSION \
-e HOSTUID="$(id -u)" \
-w /workspace \
-v $PWD:/workspace \
ldtest:latest /workspace/packaging/appimage/pre-appimage.sh
- name: Create sha256sum
run: |
Expand All @@ -63,51 +57,56 @@ jobs:
path: ./out/*
if-no-files-found: error

test-netpanzer:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [amd64]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use action from self
uses: ./
with:
platform: ${{ matrix.platform }}
dependency_commands: |
sudo apt install -y \
gettext \
liblua5.1-0-dev \
libphysfs-dev \
libsdl2-dev \
libsdl2-mixer-dev \
libsdl2-ttf-dev
build_commands: |
git clone --depth 1 https://github.com/netpanzer/netpanzer
cd netpanzer
meson setup _build -Dprefix=/usr
cd _build
ninja
install_to_appdir_commands: |
meson install --destdir=$APPDIR --skip-subprojects
linuxdeploy_output_version: $VERSION
linuxdeploy_args: |
-d netpanzer/support/win32/netpanzer.desktop \
--custom-apprun=netpanzer/support/appimage/AppRun \
--icon-file=netpanzer/netpanzer.png \
--icon-filename=netpanzer \
--executable $APPDIR/usr/bin/netpanzer \
--output appimage
#test-netpanzer:
#runs-on: ubuntu-latest
#strategy:
#matrix:
#platform: [amd64]
#steps:
#- name: Checkout
#uses: actions/checkout@v4
#- name: Checkout netpanzer
#uses: actions/checkout@v4
#with:
#repository: netpanzer/netpanzer
#path: netpanzer
#- name: Use action from self
#uses: ./
#with:
#platform: ${{ matrix.platform }}
#pre_appimage_script: rmw/packaging/appimage/pre
#sudo apt install -y \
#gettext \
#liblua5.1-0-dev \
#libphysfs-dev \
#libsdl2-dev \
#libsdl2-mixer-dev \
#libsdl2-ttf-dev
#build_commands: |
#git clone --depth 1 https://github.com/netpanzer/netpanzer
#cd netpanzer
#meson setup _build -Dprefix=/usr
#cd _build
#ninja
#install_to_appdir_commands: |
#meson install --destdir=$APPDIR --skip-subprojects
#linuxdeploy_output_version: $VERSION
#linuxdeploy_args: |
#-d netpanzer/support/win32/netpanzer.desktop \
#--custom-apprun=netpanzer/support/appimage/AppRun \
#--icon-file=netpanzer/netpanzer.png \
#--icon-filename=netpanzer \
#--executable $APPDIR/usr/bin/netpanzer \
#--output appimage

- name: Create sha256sum
run: |
cd out
sha256sum $IMAGE_FILENAME > $IMAGE_FILENAME.sha256sum
#- name: Create sha256sum
#run: |
#cd out
#sha256sum $IMAGE_FILENAME > $IMAGE_FILENAME.sha256sum

- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_FILENAME }}
path: ./out/*
if-no-files-found: error
#- name: Upload AppImage
#uses: actions/upload-artifact@v4
#with:
#name: ${{ env.IMAGE_FILENAME }}
#path: ./out/*
#if-no-files-found: error
15 changes: 0 additions & 15 deletions .github/workflows/versioning.yml

This file was deleted.

5 changes: 5 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2024-02-08

* Release v1.1.1
* Add arm/v7 support
* Install more recent versions of CMake, Meson, and Ninja
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# linuxdeploy Build Helper
# linuxdeploy Build Helper Container

A docker container that aims to help build an
[AppImage](https://github.com/AppImage/AppImageKit) using
Expand All @@ -10,9 +10,36 @@ Formerly this was an action. After much trial-and-error, I've decided to focus
on making an image that can be run locally or in a GitHub runner by project
managers using a script. Examples will be provided.

## Available architectures

amd64 (x86_64)
arm64 (aarch64)
arm/v7 (armhf)

## Locally

To build for other architectures, you may need to use qemu with docker. There
may be other ways, but you can check out [this
document](https://www.stereolabs.com/docs/docker/building-arm-container-on-x86)
for starters.

## In a GitHub Runner

See [tests.yml](https://github.com/andy5995/linuxdeploy-build-helper-container/blob/trunk/.github/workflows/test.yml)

## Example

docker run \
-t --rm \
--platform linux/arm64 \
-e VERSION="helpme" \
-e HOSTUID="$(id -u)" \
-w /workspace \
-v $PWD:/workspace \
ldtest:latest /workspace/packaging/appimage/pre-appimage.sh

<!--
## Contributing
Open an issue and ask about a change before starting work on a pull
request. -->

1 change: 1 addition & 0 deletions linuxdeploy-plugin-gtk.sh

Large diffs are not rendered by default.

0 comments on commit 8b7e9b9

Please sign in to comment.