From 77d0770a5936c6a1fc87597f7058d5e8c2746661 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Tue, 9 May 2023 12:15:15 +0200 Subject: [PATCH] Update ci --- .github/workflows/platform_natives.yaml | 38 ++++++++++++++----------- .github/workflows/tdapi_file.yaml | 34 +++++++++++++--------- 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/.github/workflows/platform_natives.yaml b/.github/workflows/platform_natives.yaml index fc0388a..81d838e 100644 --- a/.github/workflows/platform_natives.yaml +++ b/.github/workflows/platform_natives.yaml @@ -31,7 +31,7 @@ jobs: - name: Get version run: | - set -eo pipefail + set -xeo pipefail # Get latest commit short hash HASH_VERSION=$(git rev-parse --short HEAD) @@ -116,7 +116,7 @@ jobs: - name: Install custom dependencies shell: bash run: | - set -eo pipefail + set -xeo pipefail echo "REVISION: $REVISION" if [[ -f "./.github/workflows/scripts/install-deps-${SAFE_TYPE}.sh" ]]; then @@ -168,13 +168,13 @@ jobs: - name: Install vcpkg deps if: matrix.os == 'windows-2019' run: | - set -eo pipefail + set -xeo pipefail $VCPKG_DIR/vcpkg install gperf openssl:x64-windows-static zlib:x64-windows-static shell: bash - name: Build shell: bash run: | - set -eo pipefail + set -xeo pipefail echo "REVISION: $REVISION" source ./.github/workflows/scripts/build-${SAFE_TYPE}.sh @@ -186,27 +186,30 @@ jobs: if: github.ref == 'refs/heads/develop' shell: bash run: | - set -eo pipefail + set -xeo pipefail echo "REVISION: $REVISION" echo "TYPE: $TYPE" mvn -B -f natives/pom.xml -Drevision="$REVISION" -Dnative.type.classifier="$TYPE" clean package - mvn org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv-snapshot \ + mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv-snapshot \ -DrepositoryId=mchv-snapshot-distribution \ -Dfile=natives/target-$TYPE/tdlight-natives-$REVISION-$TYPE.jar \ - -DpomFile=natives/pom.xml \ + -Dpackaging=pom \ + -DgroupId=it.tdlight \ + -DartifactId=tdlight-natives \ + -Dversion=$REVISION \ + -Drevision=$REVISION \ -Dclassifier=$TYPE \ - -Drevision="$REVISION" \ -Dnative.type.classifier="$TYPE" if [[ "$TYPE" == "linux-amd64-ssl1"]]; then - mvn org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv-snapshot \ + mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv-snapshot \ -DrepositoryId=mchv-snapshot-distribution \ -Dfile=natives/.ci-friendly-pom.xml \ -Dpackaging=pom \ -DgroupId=it.tdlight \ -DartifactId=tdlight-natives \ -Dversion=$REVISION \ - -Drevision="$REVISION" \ + -Drevision=$REVISION \ -Dnative.type.classifier="$TYPE" fi @@ -219,27 +222,30 @@ jobs: if: github.ref == 'refs/heads/master' shell: bash run: | - set -eo pipefail + set -xeo pipefail echo "REVISION: $REVISION" echo "TYPE: $TYPE" mvn -B -f natives/pom.xml -Drevision="$REVISION" -Dnative.type.classifier="$TYPE" clean package - mvn org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv \ + mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv \ -DrepositoryId=mchv-release-distribution \ -Dfile=natives/target-$TYPE/tdlight-natives-$REVISION-$TYPE.jar \ - -DpomFile=natives/pom.xml \ + -Dpackaging=pom \ + -DgroupId=it.tdlight \ + -DartifactId=tdlight-natives \ + -Dversion=$REVISION \ + -Drevision=$REVISION \ -Dclassifier=$TYPE \ - -Drevision="$REVISION" \ -Dnative.type.classifier="$TYPE" if [[ "$TYPE" == "linux-amd64-ssl1"]]; then - mvn org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv \ + mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv \ -DrepositoryId=mchv-release-distribution \ -Dfile=natives/.ci-friendly-pom.xml \ -Dpackaging=pom \ -DgroupId=it.tdlight \ -DartifactId=tdlight-natives \ -Dversion=$REVISION \ - -Drevision="$REVISION" \ + -Drevision=$REVISION \ -Dnative.type.classifier="$TYPE" fi diff --git a/.github/workflows/tdapi_file.yaml b/.github/workflows/tdapi_file.yaml index 50fb7c2..ab39d3d 100644 --- a/.github/workflows/tdapi_file.yaml +++ b/.github/workflows/tdapi_file.yaml @@ -52,7 +52,7 @@ jobs: - name: Setup variables shell: bash run: | - set -eo pipefail + set -xeo pipefail # ====== Variables export REVISION=${{ github.run_number }} export GH_MATRIX_OS=${{ matrix.os }} @@ -70,7 +70,7 @@ jobs: - name: Build shell: bash run: | - set -eo pipefail + set -xeo pipefail echo "REVISION: $REVISION" ./.github/workflows/scripts/build-api.sh @@ -86,19 +86,22 @@ jobs: if: github.ref != 'refs/heads/master' shell: bash run: | - set -eo pipefail + set -xeo pipefail echo "REVISION: $REVISION" echo "Building standard package" - mvn -f api/pom.xml clean package deploy -Drevision="$REVISION" + mvn -B -f api/pom.xml clean package deploy -Drevision="$REVISION" echo "Deploying legacy package" - mvn -f api/pom.xml clean package -Dlegacy=true -Drevision="$REVISION" - mvn org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv-snapshot \ + mvn -B -f api/pom.xml clean package -Dlegacy=true -Drevision="$REVISION" + mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv-snapshot \ -DrepositoryId=mchv-snapshot-distribution \ -Dfile=api/target-legacy/tdlight-api-$REVISION-legacy.jar \ - -DpomFile=api/pom.xml \ + -Dpackaging=pom \ + -DgroupId=it.tdlight \ + -DartifactId=tdlight-api \ + -Dversion=$REVISION \ + -Drevision=$REVISION \ -Dclassifier=legacy \ - -Drevision="$REVISION" \ -Dlegacy=true env: MAVEN_USERNAME: ${{ secrets.MCHV_USERNAME }} @@ -107,20 +110,23 @@ jobs: if: github.ref == 'refs/heads/master' shell: bash run: | - set -eo pipefail + set -xeo pipefail echo "REVISION: $REVISION" echo "Deploying standard package" - mvn -f api/pom.xml clean package deploy -Drevision="$REVISION" + mvn -B -f api/pom.xml clean package deploy -Drevision="$REVISION" echo "Deploying legacy package" - mvn -f api/pom.xml clean package -Dlegacy=true -Drevision="$REVISION" - mvn org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv \ + mvn -B -f api/pom.xml clean package -Dlegacy=true -Drevision="$REVISION" + mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv \ -DrepositoryId=mchv-release-distribution \ -Dfile=api/target-legacy/tdlight-api-$REVISION-legacy.jar \ - -DpomFile=api/pom.xml \ + -Dpackaging=pom \ + -DgroupId=it.tdlight \ + -DartifactId=tdlight-api \ + -Dversion=$REVISION \ + -Drevision=$REVISION \ -Dclassifier=legacy \ - -Drevision="$REVISION" \ -Dlegacy=true