|
1 | 1 | # linuxdeploy Build Helper |
2 | 2 |
|
3 | | -An action that aims to help build an |
| 3 | +A docker container that aims to help build an |
4 | 4 | [AppImage](https://github.com/AppImage/AppImageKit) using |
5 | 5 | [linuxdeploy](https://github.com/linuxdeploy/linuxdeploy). |
6 | 6 |
|
7 | | -Currently supported platforms: |
| 7 | +## Note: |
8 | 8 |
|
9 | | - amd64 |
10 | | - arm64 |
11 | | - |
12 | | -## Inputs available |
13 | | - |
14 | | -``` |
15 | | - platform: |
16 | | - description: 'Target platform for LinuxDeploy' |
17 | | - required: true |
18 | | - default: 'amd64' |
19 | | - dependency_commands: |
20 | | - description: 'Commands to install dependencies' |
21 | | - required: false |
22 | | - default: '' |
23 | | - build_commands: |
24 | | - description: 'Commands to build the project' |
25 | | - required: true |
26 | | - default: '' |
27 | | - install_to_appdir_commands: |
28 | | - description: 'Commands to install and copy files to the destination AppDir' |
29 | | - required: true |
30 | | - default: '' |
31 | | - linuxdeploy_output_version: |
32 | | - description: 'Version string used by linuxdeploy used for the image filename' |
33 | | - required: true |
34 | | - default: '' |
35 | | - linuxdeploy_args: |
36 | | - description: 'Argument string to pass to linuxdeploy' |
37 | | - required: true |
38 | | - default: '' |
39 | | -``` |
40 | | - |
41 | | -## Example usage |
42 | | - |
43 | | -```yaml |
44 | | - build-appimage: |
45 | | - runs-on: ubuntu-latest |
46 | | - strategy: |
47 | | - matrix: |
48 | | - platform: [amd64, arm64] |
49 | | - env: |
50 | | - VERSION: ${{ inputs.version }} |
51 | | - steps: |
52 | | - - name: Checkout |
53 | | - uses: actions/checkout@v4 |
54 | | - with: |
55 | | - submodules: true |
56 | | - - if: ${{ inputs.version }} == '' |
57 | | - run: echo "VERSION=${{ github.sha }}" >> $GITHUB_ENV |
58 | | - - name: Build AppImage |
59 | | - uses: andy5995/linuxdeploy-build-helper@v1 |
60 | | - with: |
61 | | - platform: ${{ matrix.platform }} |
62 | | - dependency_commands: | |
63 | | - sudo apt install -y libncursesw5-dev |
64 | | - build_commands: | |
65 | | - export -p |
66 | | - meson setup _build -Dprefix=/usr |
67 | | - cd _build |
68 | | - ninja |
69 | | - install_to_appdir_commands: | |
70 | | - meson install --destdir=$APPDIR --skip-subprojects |
71 | | - linuxdeploy_output_version: $VERSION |
72 | | - linuxdeploy_args: | |
73 | | - -d packaging/rmw.desktop \ |
74 | | - --icon-file=packaging/rmw_icon_32x32.png \ |
75 | | - --icon-filename=rmw \ |
76 | | - --executable=$APPDIR/usr/bin/rmw \ |
77 | | - -o appimage |
78 | | -
|
79 | | - - name: Create sha256sum |
80 | | - run: | |
81 | | - cd out |
82 | | - sha256sum $IMAGE_FILENAME > $IMAGE_FILENAME.sha256sum |
83 | | -
|
84 | | - - name: Upload AppImage |
85 | | - uses: actions/upload-artifact@v4 |
86 | | - with: |
87 | | - name: ${{ env.IMAGE_FILENAME }} |
88 | | - path: ./out/* |
89 | | - if-no-files-found: error |
90 | | -``` |
91 | | -## Notes |
92 | | -
|
93 | | -The AppImage will be placed in `./` (relative to your GitHub workspace). |
94 | | - |
95 | | -The value of these variables are set in the action: |
96 | | - |
97 | | - ACTION_WORKSPACE |
98 | | - APPDIR |
99 | | - IMAGE_FILENAME (after the AppImage has been created) |
100 | | - |
101 | | -Use '$ACTION_WORKSPACE' if you need to specify an absolute path. |
102 | | -GITHUB_WORKSPACE won't work in most sections because the commands are run |
103 | | -inside a docker container as an unprivileged user. |
104 | | - |
105 | | -The arm64 builds are done using |
106 | | -[qemu](https://github.com/docker/setup-qemu-action) and will take much longer |
107 | | -than on a native arm64 system. GitHub has a timeout and if your build takes |
108 | | -longer than the timeout setting, then the job will exit before the image is |
109 | | -created. |
110 | | - |
111 | | -If you have access to a native arm64 system, you can use the docker image from |
112 | | -this action, which is `andy5995/linuxdeploy:latest` or use a linuxdeploy |
113 | | -release from their repository (link above). |
| 9 | +Formerly this was an action. After much trial-and-error, I've decided to focus |
| 10 | +on making an image that can be run locally or in a GitHub runner by project |
| 11 | +managers using a script. Examples will be provided. |
114 | 12 |
|
| 13 | +<!-- |
115 | 14 | ## Contributing |
116 | 15 |
|
117 | 16 | Open an issue and ask about a change before starting work on a pull |
118 | | -request. |
| 17 | +request. --> |
119 | 18 |
|
0 commit comments