Merge pull request 'Fix CI' (#192) from tobtoht/feather:tobtoht-patch-9 into master

Reviewed-on: https://git.wownero.com/feather/feather/pulls/192
This commit is contained in:
tobtoht 2020-12-08 16:11:43 +00:00
commit 0f96dd7fb5
4 changed files with 21 additions and 77 deletions

View file

@ -14,9 +14,10 @@ steps:
commands: commands:
- git config --global url."http://gitea:3000/tor/".insteadOf https://git.torproject.org/ - git config --global url."http://gitea:3000/tor/".insteadOf https://git.torproject.org/
- git config --global url."http://gitea:3000/".insteadOf https://github.com/ - git config --global url."http://gitea:3000/".insteadOf https://github.com/
- git submodule update --init --depth 120 monero - git config --global url."http://gitea:3000/".insteadOf https://git.wownero.com/
- git submodule update --init --depth 120 --recursive monero - git submodule update --init monero
- TOR="/usr/local/tor/bin/tor" XMRIG="/xmrig/xmrig" make -j6 release-static - git submodule update --init --recursive monero
- TOR="/usr/local/tor/bin/tor" XMRIG="/xmrig/xmrig" make -j8 release-static
environment: environment:
OPENSSL_ROOT_DIR: /usr/local/openssl/ OPENSSL_ROOT_DIR: /usr/local/openssl/
CMAKEFLAGS_EXTRA: -DFETCH_DEPS=Off CMAKEFLAGS_EXTRA: -DFETCH_DEPS=Off
@ -45,17 +46,19 @@ volumes:
path: /build/feather_files/files/linux-release/ path: /build/feather_files/files/linux-release/
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: linux-release-appimage name: linux-release-appimage
steps: steps:
- name: build - name: build
image: feather:appimage image: feather:appimage
volumes:
- name: files_linux_release
path: /files
commands: commands:
- export FN="feather-`echo $DRONE_COMMIT_AFTER | cut -c 1-7`.zip" - export FN="feather-`echo $DRONE_COMMIT_AFTER | cut -c 1-7`.zip"
- export BRANCH="$DRONE_SOURCE_BRANCH" - export BRANCH="$DRONE_SOURCE_BRANCH"
- cp /files/$BRANCH/$FN feather.zip
- bash ./contrib/build-appimage.sh - bash ./contrib/build-appimage.sh
- name: deploy - name: deploy
image: feather:appimage image: feather:appimage
@ -69,18 +72,18 @@ steps:
- echo "writing to $TARGET_DIR/$FN" - echo "writing to $TARGET_DIR/$FN"
- mv "Feather-1.0-x86_64.AppImage" "$TARGET_DIR/$FN" - mv "Feather-1.0-x86_64.AppImage" "$TARGET_DIR/$FN"
- echo "[*] written to https://build.featherwallet.org/files/linux-release-appimage/$DRONE_SOURCE_BRANCH/$FN" - echo "[*] written to https://build.featherwallet.org/files/linux-release-appimage/$DRONE_SOURCE_BRANCH/$FN"
volumes: volumes:
- name: files_linux_appimage - name: files_linux_appimage
host: host:
path: /build/feather_files/files/linux-release-appimage/ path: /build/feather_files/files/linux-release-appimage/
- name: files_linux_release
host:
path: /build/feather_files/files/linux-release/
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: windows-mxe-release name: windows-mxe-release
steps: steps:
- name: build - name: build
image: feather:win image: feather:win
@ -92,9 +95,10 @@ steps:
commands: commands:
- git config --global url."http://gitea:3000/tor/".insteadOf https://git.torproject.org/ - git config --global url."http://gitea:3000/tor/".insteadOf https://git.torproject.org/
- git config --global url."http://gitea:3000/".insteadOf https://github.com/ - git config --global url."http://gitea:3000/".insteadOf https://github.com/
- git submodule update --init --depth 120 monero - git config --global url."http://gitea:3000/".insteadOf https://git.wownero.com/
- git submodule update --init --depth 120 --recursive monero - git submodule update --init monero
- PATH="/mxe/usr/bin/:$PATH" TOR="/mxe/usr/x86_64-w64-mingw32.static/bin/tor.exe" XMRIG="/xmrig/xmrig.exe" make -j6 windows-mxe-release - git submodule update --init --recursive monero
- PATH="/mxe/usr/bin/:$PATH" TOR="/mxe/usr/x86_64-w64-mingw32.static/bin/tor.exe" XMRIG="/xmrig/xmrig.exe" make -j8 windows-mxe-release
environment: environment:
CMAKEFLAGS_EXTRA: -DFETCH_DEPS=Off CMAKEFLAGS_EXTRA: -DFETCH_DEPS=Off
- name: deploy - name: deploy
@ -111,7 +115,6 @@ steps:
- echo "writing to $TARGET_DIR/$FN" - echo "writing to $TARGET_DIR/$FN"
- zip -j "$TARGET_DIR/$FN" build/feather.log build/bin/feather.exe - zip -j "$TARGET_DIR/$FN" build/feather.log build/bin/feather.exe
- echo "[*] written to https://build.featherwallet.org/files/windows-mxe-release/$DRONE_SOURCE_BRANCH/$FN" - echo "[*] written to https://build.featherwallet.org/files/windows-mxe-release/$DRONE_SOURCE_BRANCH/$FN"
volumes: volumes:
- name: ccache_win_release - name: ccache_win_release
host: host:
@ -119,43 +122,3 @@ volumes:
- name: files_win_release - name: files_win_release
host: host:
path: /build/feather_files/files/windows-mxe-release/ path: /build/feather_files/files/windows-mxe-release/
---
kind: pipeline
type: docker
name: mac-release
steps:
- name: build
image: feather:mac
volumes:
- name: files_mac_release
path: /files
commands:
- mkdir -p build
- scp -P22 utils/build_macos.sh administrator@steve.jobs.xmr.pm:build_macos.sh
- ssh administrator@steve.jobs.xmr.pm "chmod +x build_macos.sh && PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin ~/build_macos.sh $DRONE_COMMIT_SHA"
- scp -P22 administrator@steve.jobs.xmr.pm:feather.zip build/feather.zip
- name: deploy
image: feather:mac
volumes:
- name: files_mac_release
path: /files
commands:
- export FN="feather-`echo $DRONE_COMMIT_AFTER | cut -c 1-7`.zip"
- export TARGET_DIR="/files/$DRONE_SOURCE_BRANCH"
- mkdir -p "$TARGET_DIR"
- echo "writing to $TARGET_DIR/$FN"
- mv build/feather.zip "$TARGET_DIR/$FN"
- echo "[*] written to https://build.featherwallet.org/files/mac-release/$DRONE_SOURCE_BRANCH/$FN"
volumes:
- name: files_mac_release
host:
path: /build/feather_files/files/mac-release/
---
kind: signature
hmac: 527d334190a8a824b3b781a05ae4c7d87f4fa2bc37ebc53a96db91f925fa4a52
...

View file

@ -9,7 +9,10 @@ ENV CXXFLAGS="-fPIC"
ENV SOURCE_DATE_EPOCH=1397818193 ENV SOURCE_DATE_EPOCH=1397818193
RUN apt-get update RUN apt-get update
RUN apt-get install -y nano vim ccache RUN apt-get install -y nano vim ccache software-properties-common
RUN add-apt-repository ppa:git-core/ppa
RUN apt-get update
RUN apt install -y automake git pkg-config python xutils-dev && \ RUN apt install -y automake git pkg-config python xutils-dev && \
git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xorgproto && \ git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xorgproto && \

View file

@ -3,7 +3,7 @@ FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
RUN apt clean && apt update RUN apt clean && apt update
RUN apt install -y golang git build-essential wget curl ngrep unzip file squashfs-tools desktop-file-utils patchelf libxkbcommon-x11-dev RUN apt install -y golang git build-essential wget curl ngrep unzip file squashfs-tools desktop-file-utils patchelf libxkbcommon-x11-dev libx11-xcb-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render0 libxcb-render-util0 libxcb-shape0 libxcb-sync1 libxcb-xfixes0 libxcb-shm0 libxcb-keysyms1 libxcb-xkb1
RUN go get github.com/probonopd/go-appimage/src/appimagetool RUN go get github.com/probonopd/go-appimage/src/appimagetool
RUN go build -trimpath -ldflags="-s -w" github.com/probonopd/go-appimage/src/appimagetool RUN go build -trimpath -ldflags="-s -w" github.com/probonopd/go-appimage/src/appimagetool
@ -15,4 +15,4 @@ RUN cd /usr/bin && \
RUN cd / && \ RUN cd / && \
wget -c https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-x86_64 && \ wget -c https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-x86_64 && \
chmod +x runtime-x86_64 chmod +x runtime-x86_64

View file

@ -2,33 +2,11 @@
set -e set -e
function verify_hash() {
local file=$1 expected_hash=$2
actual_hash=$(sha256sum $file | awk '{print $1}')
if [ "$actual_hash" == "$expected_hash" ]; then
return 0
else
echo "$file $actual_hash (unexpected hash)" >&2
rm "$file"
exit 1
fi
}
function download_if_not_exist() {
local file_name=$1 url=$2
if [ ! -e $file_name ] ; then
wget -q -O $file_name "$url"
fi
}
APPDIR="$PWD/feather.AppDir" APPDIR="$PWD/feather.AppDir"
mkdir -p "$APPDIR" mkdir -p "$APPDIR"
mkdir -p "$APPDIR/usr/share/applications/" mkdir -p "$APPDIR/usr/share/applications/"
mkdir -p "$APPDIR/usr/bin" mkdir -p "$APPDIR/usr/bin"
echo "Downloading dependencies"
download_if_not_exist "feather.zip" "https://build.featherwallet.org/files/linux-release/$BRANCH/$FN"
unzip -q feather.zip unzip -q feather.zip
cp "$PWD/src/assets/feather.desktop" "$APPDIR/usr/share/applications/feather.desktop" cp "$PWD/src/assets/feather.desktop" "$APPDIR/usr/share/applications/feather.desktop"