From 2365d98b20ea3c08b3af389d7a9f97f8dc180c2a Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Thu, 20 Apr 2023 08:52:50 +0300 Subject: [PATCH 1/2] change build for gitlab --- .gitlab-ci.yml | 24 ++++++++++++++++++++++++ build-all.sh | 10 +++++----- 2 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f091f06 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,24 @@ +stages: + - build_go + +build_go: + image: golang:latest + stage: build_go + when: manual + tags: + - amd64 + artifacts: + name: "TorrServer" + paths: + - dist + script: + - apt update + - apt install -y npm zip + - rm -rf /var/lib/apt/lists/* + - npm install -g yarn + - wget -q "https://dl.google.com/android/repository/android-ndk-r25c-linux.zip" + - unzip ./android-ndk-r25c-linux.zip + - rm ./android-ndk-r25c-linux.zip + - pwd + - ls -l + - ./build-all.sh diff --git a/build-all.sh b/build-all.sh index 020dbc2..7f3e957 100755 --- a/build-all.sh +++ b/build-all.sh @@ -1,9 +1,9 @@ #!/bin/bash PLATFORMS=( + 'linux/amd64' 'linux/arm64' 'linux/arm7' - 'linux/amd64' 'linux/arm5' 'linux/386' 'windows/amd64' @@ -90,9 +90,9 @@ declare -a COMPILERS=( "amd64:x86_64-linux-android21-clang" ) -export NDK_VERSION="23.1.7779620" # 25.1.8937393 -export NDK_TOOLCHAIN=${ANDROID_HOME}/ndk/${NDK_VERSION}/toolchains/llvm/prebuilt/darwin-x86_64 - +export NDK_VERSION="25.2.9519653" # 25.1.8937393 +#export NDK_TOOLCHAIN=${ANDROID_HOME}/ndk/${NDK_VERSION}/toolchains/llvm/prebuilt/darwin-x86_64 +export NDK_TOOLCHAIN="${PWD}/../android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64" GOOS=android for V in "${COMPILERS[@]}"; do @@ -115,4 +115,4 @@ if [[ "${FAILURES}" != "" ]]; then echo "" echo "failed on: ${FAILURES}" exit 1 -fi +fi \ No newline at end of file From b6afbd72c54166f493d537d768ddc6b0007d5119 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Mon, 24 Apr 2023 08:58:59 +0300 Subject: [PATCH 2/2] remove log --- server/rutor/rutor.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/rutor/rutor.go b/server/rutor/rutor.go index 157f1dd..a5eb304 100644 --- a/server/rutor/rutor.go +++ b/server/rutor/rutor.go @@ -131,8 +131,6 @@ func loadDB() { err = dec.Decode(&torr) if err == nil { ftorrs = append(ftorrs, torr) - } else { - log.TLogln("Error read rutor db:", err) } } torrs = ftorrs