diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 925bd8c18bb73914558c77e529f74c04d9643d01..64dd8ac45d4042e53fb20196f4c0b1714690a9d8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,45 @@ -stages: +# This file is a template, and might need editing before it works on your project. +# To contribute improvements to CI/CD templates, please follow the Development guide at: +# https://docs.gitlab.com/ee/development/cicd/templates.html +# This specific template is located at: +# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml + +# This is a sample GitLab CI/CD configuration file that should run without any modifications. +# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts, +# it uses echo commands to simulate the pipeline execution. +# +# A pipeline is composed of independent jobs that run scripts, grouped into stages. +# Stages run in sequential order, but jobs within stages run in parallel. +# +# For more information, see: https://docs.gitlab.com/ee/ci/yaml/README.html#stages + +stages: # List of stages for jobs, and their order of execution - build + - test + - deploy -appimage: +build-job: # This job runs in the build stage, which runs first. stage: build - image: ubuntu:14.04 script: - - ./scripts/package appimage - artifacts: - paths: - - build_*/pling-store*.AppImage* - expire_in: 2 days + - echo "Compiling the code..." + - echo "Compile complete." + +unit-test-job: # This job runs in the test stage. + stage: test # It only starts when the job in the build stage completes successfully. + script: + - echo "Running unit tests... This will take about 60 seconds." + - sleep 60 + - echo "Code coverage is 90%" + +lint-test-job: # This job also runs in the test stage. + stage: test # It can run at the same time as unit-test-job (in parallel). + script: + - echo "Linting code... This will take about 10 seconds." + - sleep 10 + - echo "No lint issues found." + +deploy-job: # This job runs in the deploy stage. + stage: deploy # It only runs when *both* jobs in the test stage complete successfully. + script: + - echo "Deploying application..." + - echo "Application successfully deployed." diff --git a/package.json b/package.json index 42c5bd1cbbee374effb70880dbbb08cf3ea6443e..d960c60e1629673eda2514a4fb0f24afc51e6dd8 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "scripts": { "start": "react-scripts build && electron .", "debug": "electron . --debug", - "package": "electron-packager . pling-store --platform=linux --arch=x64 --out=dist --overwrite --ignore='^/(\\.gitignore|\\.gitlab\\-ci\\.yml|Makefile|README\\.md|desktop|launcher|pkg|scripts|appimagebuild)($|/)'", + "package": "electron-packager . pling-store --platform=linux --arch=arm64 --out=dist --overwrite --ignore='^/(\\.gitignore|\\.gitlab\\-ci\\.yml|Makefile|README\\.md|desktop|launcher|pkg|scripts|appimagebuild)($|/)'", "watch": "webpack --mode development --watch", "react-start": "react-scripts start", "build": "react-scripts build", diff --git a/pkg/appimage/appimagebuild b/pkg/appimage/appimagebuild index 2655808393d7399269006ff098657817cfaf2ae1..76ca8617d9d2d41a1ccdaf45e173d0789ec305ac 100755 --- a/pkg/appimage/appimagebuild +++ b/pkg/appimage/appimagebuild @@ -10,8 +10,8 @@ else PKGREL='1' fi -APPIMAGE_FILE_NAME=${PKGNAME}-${PKGVER}-${PKGREL}-x86_64.AppImage -ZSYNC_FILE_NAME=${PKGNAME}-${CI_COMMIT_REF_SLUG}-x86_64.AppImage.zsync +APPIMAGE_FILE_NAME=${PKGNAME}-${PKGVER}-${PKGREL}-aarch64.AppImage +ZSYNC_FILE_NAME=${PKGNAME}-${CI_COMMIT_REF_SLUG}-aarch64.AppImage.zsync UPDINFO="zsync|https://www.opencode.net/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/jobs/artifacts/${CI_COMMIT_REF_SLUG}/raw/build_pling-store/${ZSYNC_FILE_NAME}?job=appimage" APPDIR="${PKGNAME}.AppDir" @@ -26,26 +26,26 @@ install -D -m 755 ${APPDIR}/usr/bin/${PKGNAME} ${APPDIR}/AppRun install -D -m 644 ${APPDIR}/usr/share/applications/${PKGNAME}.desktop ${APPDIR}/${PKGNAME}.desktop install -D -m 644 ${APPDIR}/usr/share/icons/hicolor/scalable/apps/${PKGNAME}.svg ${APPDIR}/${PKGNAME}.svg -install -D -m 755 /usr/lib/x86_64-linux-gnu/libgconf-2.so.4 ${APPDIR}/usr/lib/ocs-store-linux-x64/libgconf-2.so.4 -install -D -m 755 /usr/lib/x86_64-linux-gnu/libXss.so.1 ${APPDIR}/usr/lib/ocs-store-linux-x64/libXss.so.1 -install -D -m 755 /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libcanberra-gtk-module.so ${APPDIR}/usr/lib/ocs-store-linux-x64/libcanberra-gtk-module.so -install -D -m 755 /usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0 ${APPDIR}/usr/lib/ocs-store-linux-x64/libgnome-keyring.so.0 +install -D -m 755 /usr/lib/aarch64-linux-gnu/libgconf-2.so.4 ${APPDIR}/usr/lib/ocs-store-linux-x64/libgconf-2.so.4 +install -D -m 755 /usr/lib/aarch64-linux-gnu/libXss.so.1 ${APPDIR}/usr/lib/ocs-store-linux-x64/libXss.so.1 +install -D -m 755 /usr/lib/aarch64-linux-gnu/gtk-2.0/modules/libcanberra-gtk-module.so ${APPDIR}/usr/lib/ocs-store-linux-x64/libcanberra-gtk-module.so +install -D -m 755 /usr/lib/aarch64-linux-gnu/libgnome-keyring.so.0 ${APPDIR}/usr/lib/ocs-store-linux-x64/libgnome-keyring.so.0 -curl -fsSL -o ocs-manager https://www.opencode.net/dfn2/ocs-manager/-/jobs/artifacts/master/raw/build_ocs-manager/ocs-manager-0.8.1-1-x86_64.AppImage?job=appimage +curl -fsSL -o ocs-manager https://www.opencode.net/dfn2/ocs-manager/-/jobs/artifacts/master/raw/build_ocs-manager/ocs-manager-0.8.1-1-aarch64.AppImage?job=appimage install -D -m 755 ocs-manager ${APPDIR}/usr/bin/ocs-manager IMWHEEL_PATH=$(which imwheel) install -D -m 755 ${IMWHEEL_PATH} ${APPDIR}/usr/bin/ocs-imwheel install -D -m 644 imwheel.conf ${APPDIR}/usr/share/imwheel/.imwheelrc -curl -fsSL -o appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage +curl -fsSL -o appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-aarch64.AppImage chmod 755 appimagetool ./appimagetool --appimage-extract ./squashfs-root/AppRun -u "${UPDINFO}" ${APPDIR} # Fix url in zsync file -sed -i "/^URL:.*$/c\URL: ${APPIMAGE_FILE_NAME}?job=appimage" *-x86_64.AppImage.zsync -sed -i "/^Filename:.*$/c\Filename: ${APPIMAGE_FILE_NAME}" *-x86_64.AppImage.zsync +sed -i "/^URL:.*$/c\URL: ${APPIMAGE_FILE_NAME}?job=appimage" *-aarch64.AppImage.zsync +sed -i "/^Filename:.*$/c\Filename: ${APPIMAGE_FILE_NAME}" *-aarch64.AppImage.zsync -mv *-x86_64.AppImage ../${APPIMAGE_FILE_NAME} -mv *-x86_64.AppImage.zsync ../${ZSYNC_FILE_NAME} +mv *-aarch64.AppImage ../${APPIMAGE_FILE_NAME} +mv *-aarch64.AppImage.zsync ../${ZSYNC_FILE_NAME} diff --git a/scripts/.package.swp b/scripts/.package.swp new file mode 100644 index 0000000000000000000000000000000000000000..286ed3c5aa43ed6d901a3975e18d4da98c3fb91a Binary files /dev/null and b/scripts/.package.swp differ