From a1f3d6ff6c3c3d0a6ad305d852a08cd73ea0402d Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Sat, 13 Apr 2024 01:32:40 +0200 Subject: [PATCH] ci(linux): add option to check all architectures [skip ci] --- .github/workflows/insider-linux.yml | 5 +- .github/workflows/stable-linux.yml | 1 + check_tags.sh | 286 ++++++++++++++-------------- 3 files changed, 150 insertions(+), 142 deletions(-) diff --git a/.github/workflows/insider-linux.yml b/.github/workflows/insider-linux.yml index a753526..24a2f17 100644 --- a/.github/workflows/insider-linux.yml +++ b/.github/workflows/insider-linux.yml @@ -61,6 +61,7 @@ jobs: - name: Check existing VSCodium tags/releases env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CHECK_ALL: 'yes' run: ./check_tags.sh compile: @@ -241,8 +242,8 @@ jobs: npm_arch: arm64 - vscode_arch: armhf npm_arch: arm - # - vscode_arch: ppc64le - # npm_arch: ppc64 + - vscode_arch: ppc64le + npm_arch: ppc64 - vscode_arch: riscv64 npm_arch: riscv64 env: diff --git a/.github/workflows/stable-linux.yml b/.github/workflows/stable-linux.yml index f70caec..f4e43c6 100644 --- a/.github/workflows/stable-linux.yml +++ b/.github/workflows/stable-linux.yml @@ -60,6 +60,7 @@ jobs: - name: Check existing VSCodium tags/releases env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CHECK_ALL: 'yes' run: ./check_tags.sh compile: diff --git a/check_tags.sh b/check_tags.sh index 98c9c51..ef47e27 100755 --- a/check_tags.sh +++ b/check_tags.sh @@ -219,154 +219,160 @@ elif [[ "${ASSETS}" != "null" ]]; then echo "Already have the Linux REH ${VSCODE_ARCH} archive" export SHOULD_BUILD_REH="no" fi - - # linux-arm64 - elif [[ "${VSCODE_ARCH}" == "arm64" ]]; then - if [[ -z $( contains "arm64.deb" ) ]]; then - echo "Building on Linux arm64 because we have no DEB" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_DEB="no" - fi - - if [[ -z $( contains "aarch64.rpm" ) ]]; then - echo "Building on Linux arm64 because we have no RPM" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_RPM="no" - fi - - if [[ -z $( contains "${APP_NAME}-linux-arm64-${RELEASE_VERSION}.tar.gz" ) ]]; then - echo "Building on Linux arm64 because we have no TAR" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_TAR="no" - fi - - if [[ "${CHECK_REH}" != "no" && -z $( contains "${APP_NAME_LC}-reh-linux-arm64-${RELEASE_VERSION}.tar.gz" ) ]]; then - echo "Building on Linux arm64 because we have no REH archive" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_REH="no" - fi - - export SHOULD_BUILD_APPIMAGE="no" - - if [[ "${SHOULD_BUILD}" != "yes" ]]; then - echo "Already have all the Linux arm64 builds" - fi - - # linux-armhf - elif [[ "${VSCODE_ARCH}" == "armhf" ]]; then - if [[ -z $( contains "armhf.deb" ) ]]; then - echo "Building on Linux arm because we have no DEB" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_DEB="no" - fi - - if [[ -z $( contains "armv7hl.rpm" ) ]]; then - echo "Building on Linux arm because we have no RPM" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_RPM="no" - fi - - if [[ -z $( contains "${APP_NAME}-linux-armhf-${RELEASE_VERSION}.tar.gz" ) ]]; then - echo "Building on Linux arm because we have no TAR" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_TAR="no" - fi - - if [[ "${CHECK_REH}" != "no" && -z $( contains "${APP_NAME_LC}-reh-linux-armhf-${RELEASE_VERSION}.tar.gz" ) ]]; then - echo "Building on Linux arm because we have no REH archive" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_REH="no" - fi - - export SHOULD_BUILD_APPIMAGE="no" - - if [[ "${SHOULD_BUILD}" != "yes" ]]; then - echo "Already have all the Linux arm builds" - fi - - # linux-ppc64le - elif [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then - SHOULD_BUILD_APPIMAGE="no" - SHOULD_BUILD_DEB="no" - SHOULD_BUILD_RPM="no" - SHOULD_BUILD_TAR="no" - - if [[ -z $( contains "${APP_NAME_LC}-reh-linux-ppc64le-${RELEASE_VERSION}.tar.gz" ) ]]; then - echo "Building on Linux PowerPC64LE because we have no REH archive" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_REH="no" - fi - - if [[ "${SHOULD_BUILD}" != "yes" ]]; then - echo "Already have all the Linux PowerPC64LE builds" - fi - - # linux-riscv64 - elif [[ "${VSCODE_ARCH}" == "riscv64" ]]; then - SHOULD_BUILD_APPIMAGE="no" - SHOULD_BUILD_DEB="no" - SHOULD_BUILD_RPM="no" - SHOULD_BUILD_TAR="no" - - if [[ -z $( contains "${APP_NAME_LC}-reh-linux-riscv64-${RELEASE_VERSION}.tar.gz" ) ]]; then - echo "Building on Linux RISC-V64 because we have no REH archive" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_REH="no" - fi - - if [[ "${SHOULD_BUILD}" != "yes" ]]; then - echo "Already have all the Linux PowerPC64LE builds" - fi - - # linux-x64 else - if [[ -z $( contains "amd64.deb" ) ]]; then - echo "Building on Linux x64 because we have no DEB" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_DEB="no" - fi - if [[ -z $( contains "x86_64.rpm" ) ]]; then - echo "Building on Linux x64 because we have no RPM" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_RPM="no" - fi + # linux-arm64 + if [[ "${VSCODE_ARCH}" == "arm64" || "${CHECK_ALL}" == "yes" ]]; then + if [[ -z $( contains "arm64.deb" ) ]]; then + echo "Building on Linux arm64 because we have no DEB" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_DEB="no" + fi - if [[ -z $( contains "${APP_NAME}-linux-x64-${RELEASE_VERSION}.tar.gz" ) ]]; then - echo "Building on Linux x64 because we have no TAR" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_TAR="no" - fi + if [[ -z $( contains "aarch64.rpm" ) ]]; then + echo "Building on Linux arm64 because we have no RPM" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_RPM="no" + fi + + if [[ -z $( contains "${APP_NAME}-linux-arm64-${RELEASE_VERSION}.tar.gz" ) ]]; then + echo "Building on Linux arm64 because we have no TAR" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_TAR="no" + fi + + if [[ "${CHECK_REH}" != "no" && -z $( contains "${APP_NAME_LC}-reh-linux-arm64-${RELEASE_VERSION}.tar.gz" ) ]]; then + echo "Building on Linux arm64 because we have no REH archive" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_REH="no" + fi - if [[ -z $( contains "x86_64.AppImage" ) ]]; then - echo "Building on Linux x64 because we have no AppImage" - export SHOULD_BUILD="yes" - else export SHOULD_BUILD_APPIMAGE="no" + + if [[ "${SHOULD_BUILD}" != "yes" ]]; then + echo "Already have all the Linux arm64 builds" + fi fi - if [[ "${CHECK_REH}" != "no" && -z $( contains "${APP_NAME_LC}-reh-linux-x64-${RELEASE_VERSION}.tar.gz" ) ]]; then - echo "Building on Linux x64 because we have no REH archive" - export SHOULD_BUILD="yes" - else - export SHOULD_BUILD_REH="no" + # linux-armhf + if [[ "${VSCODE_ARCH}" == "armhf" || "${CHECK_ALL}" == "yes" ]]; then + if [[ -z $( contains "armhf.deb" ) ]]; then + echo "Building on Linux arm because we have no DEB" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_DEB="no" + fi + + if [[ -z $( contains "armv7hl.rpm" ) ]]; then + echo "Building on Linux arm because we have no RPM" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_RPM="no" + fi + + if [[ -z $( contains "${APP_NAME}-linux-armhf-${RELEASE_VERSION}.tar.gz" ) ]]; then + echo "Building on Linux arm because we have no TAR" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_TAR="no" + fi + + if [[ "${CHECK_REH}" != "no" && -z $( contains "${APP_NAME_LC}-reh-linux-armhf-${RELEASE_VERSION}.tar.gz" ) ]]; then + echo "Building on Linux arm because we have no REH archive" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_REH="no" + fi + + export SHOULD_BUILD_APPIMAGE="no" + + if [[ "${SHOULD_BUILD}" != "yes" ]]; then + echo "Already have all the Linux arm builds" + fi fi - if [[ "${SHOULD_BUILD}" != "yes" ]]; then - echo "Already have all the Linux x64 builds" + # linux-ppc64le + if [[ "${VSCODE_ARCH}" == "ppc64le" || "${CHECK_ALL}" == "yes" ]]; then + SHOULD_BUILD_APPIMAGE="no" + SHOULD_BUILD_DEB="no" + SHOULD_BUILD_RPM="no" + SHOULD_BUILD_TAR="no" + + if [[ -z $( contains "${APP_NAME_LC}-reh-linux-ppc64le-${RELEASE_VERSION}.tar.gz" ) ]]; then + echo "Building on Linux PowerPC64LE because we have no REH archive" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_REH="no" + fi + + if [[ "${SHOULD_BUILD}" != "yes" ]]; then + echo "Already have all the Linux PowerPC64LE builds" + fi + fi + + # linux-riscv64 + if [[ "${VSCODE_ARCH}" == "riscv64" || "${CHECK_ALL}" == "yes" ]]; then + SHOULD_BUILD_APPIMAGE="no" + SHOULD_BUILD_DEB="no" + SHOULD_BUILD_RPM="no" + SHOULD_BUILD_TAR="no" + + if [[ -z $( contains "${APP_NAME_LC}-reh-linux-riscv64-${RELEASE_VERSION}.tar.gz" ) ]]; then + echo "Building on Linux RISC-V64 because we have no REH archive" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_REH="no" + fi + + if [[ "${SHOULD_BUILD}" != "yes" ]]; then + echo "Already have all the Linux PowerPC64LE builds" + fi + fi + + # linux-x64 + if [[ "${VSCODE_ARCH}" == "x64" || "${CHECK_ALL}" == "yes" ]]; then + if [[ -z $( contains "amd64.deb" ) ]]; then + echo "Building on Linux x64 because we have no DEB" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_DEB="no" + fi + + if [[ -z $( contains "x86_64.rpm" ) ]]; then + echo "Building on Linux x64 because we have no RPM" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_RPM="no" + fi + + if [[ -z $( contains "${APP_NAME}-linux-x64-${RELEASE_VERSION}.tar.gz" ) ]]; then + echo "Building on Linux x64 because we have no TAR" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_TAR="no" + fi + + if [[ -z $( contains "x86_64.AppImage" ) ]]; then + echo "Building on Linux x64 because we have no AppImage" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_APPIMAGE="no" + fi + + if [[ "${CHECK_REH}" != "no" && -z $( contains "${APP_NAME_LC}-reh-linux-x64-${RELEASE_VERSION}.tar.gz" ) ]]; then + echo "Building on Linux x64 because we have no REH archive" + export SHOULD_BUILD="yes" + else + export SHOULD_BUILD_REH="no" + fi + + if [[ "${SHOULD_BUILD}" != "yes" ]]; then + echo "Already have all the Linux x64 builds" + fi fi fi fi @@ -374,7 +380,7 @@ else if [[ "${IS_SPEARHEAD}" == "yes" ]]; then export SHOULD_BUILD_SRC="yes" elif [[ "${OS_NAME}" == "linux" ]]; then - if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then + if [[ "${VSCODE_ARCH}" == "ppc64le" || "${VSCODE_ARCH}" == "riscv64" ]]; then SHOULD_BUILD_DEB="no" SHOULD_BUILD_RPM="no" SHOULD_BUILD_TAR="no"