Skip to content

Commit

Permalink
CI: Integrate changes from linuxmotehook2 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
git-developer authored Sep 22, 2023
1 parent 2b7ec6b commit dac63e0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ env:
UBUNTU_PUBKEY: 871920D1991BC93C

on:
push:
branches: [ "main" ]
pull_request:
push:
branches: main
release:
types: published

jobs:
build:
Expand Down Expand Up @@ -44,17 +46,16 @@ jobs:
TARGET_PLATFORM: ${{ matrix.platform }}
shell: bash
run: |
set -eu
find build -mindepth 1 -maxdepth 1 -type d | while read -r path; do
set -a
APPIMAGE_SOURCE="${path}"
APPIMAGE_VERSION="${GITHUB_REF_SLUG}"
APPIMAGE_APT_ARCH="${TARGET_PLATFORM#*/}"
APPIMAGE_APT_DISTRO="${UBUNTU_RELEASE}"
APPIMAGE_APT_PUBKEY="${UBUNTU_PUBKEY}"
APPIMAGE_ARCH="$(basename "${path}")"
printenv | grep ^APPIMAGE_ >>"${GITHUB_ENV}"
done
set -eua
. build/.build-metadata.env
rm build/.build-metadata.env
APPIMAGE_SOURCE=build
APPIMAGE_VERSION="${GITHUB_REF_SLUG}"
APPIMAGE_APT_ARCH="${TARGETARCH}"
APPIMAGE_APT_DISTRO="${UBUNTU_RELEASE}"
APPIMAGE_APT_PUBKEY="${UBUNTU_PUBKEY}"
APPIMAGE_ARCH="${TARGETMACHINE}"
printenv | grep ^APPIMAGE_ >>"${GITHUB_ENV}"
- name: Build AppImage
uses: AppImageCrafters/[email protected]
Expand Down
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ COPY . /

ARG BUILD_TYPE=release
ARG ENABLE_LTO=true
ARG TARGETOS TARGETARCH TARGETVARIANT

RUN meson setup \
--fatal-meson-warnings \
"--buildtype=${BUILD_TYPE}" \
"-Db_lto=${ENABLE_LTO}" \
"--prefix=/usr" \
--prefix=/usr \
/build && \
meson compile -C /build && \
meson install --destdir="/release/$(uname -m)" -C /build
meson install --destdir=/release -C /build

FROM scratch AS export-stage
RUN export "TARGETMACHINE=$(uname -m)" && \
printenv | grep ^TARGET >>/release/.build-metadata.env

COPY --from=build-stage /release/ /
FROM scratch AS export-stage
COPY --from=build-stage /release/ /release/.build-metadata.env /
4 changes: 3 additions & 1 deletion dist/AppImageBuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ script:
mkdir -p "${icon_path}"
cp -a dist/evdevhook2.png "${icon_path}"
# Manual installation is required until fix of https://github.com/AppImageCrafters/build-appimage/issues/5
apt-get update && apt-get install -y --no-install-recommends squashfs-tools
if ! command -v mksquashfs >/dev/null; then
apt-get update && apt-get install -y --no-install-recommends squashfs-tools
fi
AppDir:
app_info:
Expand Down

0 comments on commit dac63e0

Please sign in to comment.