You've already forked linuxdeploy
mirror of
https://github.com/encounter/linuxdeploy.git
synced 2026-07-10 12:18:44 -07:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 01311f1ce3 | |||
| 87e377cb3c | |||
| a56aac5ecf |
@@ -12,7 +12,7 @@ jobs:
|
|||||||
build-and-test:
|
build-and-test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
ARCH: [x86_64, i386]
|
ARCH: [x86_64, i386, aarch64]
|
||||||
BUILD_TYPE: [appimage, coverage]
|
BUILD_TYPE: [appimage, coverage]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
@@ -41,13 +41,45 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y gcovr libmagic-dev:i386 libjpeg-dev:i386 libpng-dev:i386 libboost-filesystem-dev:i386 libboost-regex-dev:i386 cimg-dev gcc-multilib g++-multilib libfuse2:i386
|
sudo apt-get install -y gcovr libmagic-dev:i386 libjpeg-dev:i386 libpng-dev:i386 libboost-filesystem-dev:i386 libboost-regex-dev:i386 cimg-dev gcc-multilib g++-multilib libfuse2:i386
|
||||||
|
|
||||||
- name: Test coverage
|
- name: Test coverage (native)
|
||||||
run: bash -ex ci/test-coverage.sh
|
run: bash -ex ci/test-coverage.sh
|
||||||
if: matrix.BUILD_TYPE == 'coverage'
|
if: matrix.ARCH != 'aarch64' && matrix.BUILD_TYPE == 'coverage'
|
||||||
|
|
||||||
- name: Build, test and build AppImage
|
- name: Test coverage (VM)
|
||||||
|
if: matrix.ARCH != 'x86_64' && matrix.ARCH != 'i386' && matrix.BUILD_TYPE == 'coverage'
|
||||||
|
uses: uraimo/run-on-arch-action@v2.2.0
|
||||||
|
with:
|
||||||
|
arch: ${{ matrix.ARCH }}
|
||||||
|
distro: ubuntu20.04
|
||||||
|
githubToken: ${{ github.token }}
|
||||||
|
dockerRunArgs: |
|
||||||
|
--volume "${PWD}:/build"
|
||||||
|
install: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y build-essential wget git pkg-config autoconf libmagic-dev libjpeg-dev libpng-dev cimg-dev libboost-filesystem-dev libboost-regex-dev gcovr
|
||||||
|
run: |
|
||||||
|
cd /build
|
||||||
|
ARCH=$(uname -m) ci/test-coverage.sh
|
||||||
|
|
||||||
|
- name: Build, test and build AppImage (native)
|
||||||
|
if: matrix.ARCH != 'aarch64' && matrix.BUILD_TYPE != 'coverage'
|
||||||
run: bash -ex ci/build.sh
|
run: bash -ex ci/build.sh
|
||||||
if: matrix.BUILD_TYPE != 'coverage'
|
|
||||||
|
- name: Build, test and build AppImage (VM)
|
||||||
|
if: matrix.ARCH != 'x86_64' && matrix.ARCH != 'i386' && matrix.BUILD_TYPE != 'coverage'
|
||||||
|
uses: uraimo/run-on-arch-action@v2.2.0
|
||||||
|
with:
|
||||||
|
arch: ${{ matrix.ARCH }}
|
||||||
|
distro: ubuntu20.04
|
||||||
|
githubToken: ${{ github.token }}
|
||||||
|
dockerRunArgs: |
|
||||||
|
--volume "${PWD}:/build"
|
||||||
|
install: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y build-essential wget git pkg-config autoconf libmagic-dev libjpeg-dev libpng-dev cimg-dev libboost-filesystem-dev libboost-regex-dev gcovr
|
||||||
|
run: |
|
||||||
|
cd /build
|
||||||
|
ARCH=$(uname -m) ci/build.sh
|
||||||
|
|
||||||
- name: Archive artifacts
|
- name: Archive artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ fi
|
|||||||
|
|
||||||
# support cross-compilation for 32-bit ISAs
|
# support cross-compilation for 32-bit ISAs
|
||||||
case "$ARCH" in
|
case "$ARCH" in
|
||||||
"x86_64"|"amd64")
|
"x86_64"|"amd64"|"armhf"|"aarch64")
|
||||||
;;
|
;;
|
||||||
"i386"|"i586"|"i686")
|
"i386"|"i586"|"i686")
|
||||||
export CFLAGS="-m32"
|
export CFLAGS="-m32"
|
||||||
@@ -44,7 +44,7 @@ BUILD_DIR=$(mktemp -d -p "$TEMP_BASE" linuxdeploy-build-XXXXXX)
|
|||||||
pushd "$BUILD_DIR"
|
pushd "$BUILD_DIR"
|
||||||
|
|
||||||
# fetch source code
|
# fetch source code
|
||||||
wget https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.xz -O- | tar xJ --strip-components=1
|
wget http://mirrors.kernel.org/gnu/binutils/binutils-2.35.tar.xz -O- | tar xJ --strip-components=1
|
||||||
|
|
||||||
# configure static build
|
# configure static build
|
||||||
# inspired by https://github.com/andrew-d/static-binaries/blob/master/binutils/build.sh
|
# inspired by https://github.com/andrew-d/static-binaries/blob/master/binutils/build.sh
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ fi
|
|||||||
|
|
||||||
# support cross-compilation for 32-bit ISAs
|
# support cross-compilation for 32-bit ISAs
|
||||||
case "$ARCH" in
|
case "$ARCH" in
|
||||||
"x86_64"|"amd64")
|
"x86_64"|"amd64"|"armhf"|"aarch64")
|
||||||
;;
|
;;
|
||||||
"i386"|"i586"|"i686")
|
"i386"|"i586"|"i686")
|
||||||
export CFLAGS="-m32"
|
export CFLAGS="-m32"
|
||||||
|
|||||||
+6
-2
@@ -30,6 +30,10 @@ if [ "$ARCH" == "x86_64" ]; then
|
|||||||
EXTRA_CMAKE_ARGS=()
|
EXTRA_CMAKE_ARGS=()
|
||||||
elif [ "$ARCH" == "i386" ]; then
|
elif [ "$ARCH" == "i386" ]; then
|
||||||
EXTRA_CMAKE_ARGS=("-DCMAKE_TOOLCHAIN_FILE=$REPO_ROOT/cmake/toolchains/i386-linux-gnu.cmake" "-DUSE_SYSTEM_CIMG=OFF")
|
EXTRA_CMAKE_ARGS=("-DCMAKE_TOOLCHAIN_FILE=$REPO_ROOT/cmake/toolchains/i386-linux-gnu.cmake" "-DUSE_SYSTEM_CIMG=OFF")
|
||||||
|
elif [ "$ARCH" == "armhf" ]; then
|
||||||
|
EXTRA_CMAKE_ARGS=()
|
||||||
|
elif [ "$ARCH" == "aarch64" ]; then
|
||||||
|
EXTRA_CMAKE_ARGS=()
|
||||||
else
|
else
|
||||||
echo "Architecture not supported: $ARCH" 1>&2
|
echo "Architecture not supported: $ARCH" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
@@ -37,7 +41,7 @@ fi
|
|||||||
|
|
||||||
# fetch up-to-date CMake
|
# fetch up-to-date CMake
|
||||||
mkdir cmake-prefix
|
mkdir cmake-prefix
|
||||||
wget -O- https://github.com/Kitware/CMake/releases/download/v3.18.1/cmake-3.18.1-Linux-x86_64.tar.gz | tar -xz -C cmake-prefix --strip-components=1
|
wget -O- https://github.com/Kitware/CMake/releases/download/v3.19.6/cmake-3.19.6-Linux-$(uname -m).tar.gz | tar -xz -C cmake-prefix --strip-components=1
|
||||||
export PATH="$(readlink -f cmake-prefix/bin):$PATH"
|
export PATH="$(readlink -f cmake-prefix/bin):$PATH"
|
||||||
cmake --version
|
cmake --version
|
||||||
|
|
||||||
@@ -69,7 +73,7 @@ bin/linuxdeploy "${LINUXDEPLOY_ARGS[@]}"
|
|||||||
# bundle AppImage plugin
|
# bundle AppImage plugin
|
||||||
mkdir -p AppDir/plugins
|
mkdir -p AppDir/plugins
|
||||||
|
|
||||||
wget https://github.com/TheAssassin/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-"$ARCH".AppImage
|
wget https://github.com/encounter/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-"$ARCH".AppImage
|
||||||
chmod +x linuxdeploy-plugin-appimage-"$ARCH".AppImage
|
chmod +x linuxdeploy-plugin-appimage-"$ARCH".AppImage
|
||||||
./linuxdeploy-plugin-appimage-"$ARCH".AppImage --appimage-extract
|
./linuxdeploy-plugin-appimage-"$ARCH".AppImage --appimage-extract
|
||||||
mv squashfs-root/ AppDir/plugins/linuxdeploy-plugin-appimage
|
mv squashfs-root/ AppDir/plugins/linuxdeploy-plugin-appimage
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ if [ "$ARCH" == "x86_64" ]; then
|
|||||||
EXTRA_CMAKE_ARGS=()
|
EXTRA_CMAKE_ARGS=()
|
||||||
elif [ "$ARCH" == "i386" ]; then
|
elif [ "$ARCH" == "i386" ]; then
|
||||||
EXTRA_CMAKE_ARGS=("-DCMAKE_TOOLCHAIN_FILE=$REPO_ROOT/cmake/toolchains/i386-linux-gnu.cmake" "-DUSE_SYSTEM_CIMG=OFF")
|
EXTRA_CMAKE_ARGS=("-DCMAKE_TOOLCHAIN_FILE=$REPO_ROOT/cmake/toolchains/i386-linux-gnu.cmake" "-DUSE_SYSTEM_CIMG=OFF")
|
||||||
|
elif [ "$ARCH" == "armhf" ]; then
|
||||||
|
EXTRA_CMAKE_ARGS=()
|
||||||
|
elif [ "$ARCH" == "aarch64" ]; then
|
||||||
|
EXTRA_CMAKE_ARGS=()
|
||||||
else
|
else
|
||||||
echo "Architecture not supported: $ARCH" 1>&2
|
echo "Architecture not supported: $ARCH" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user