From b09c58905bdad92c1a6ceceffd6b2698cf40798e Mon Sep 17 00:00:00 2001 From: Jamil RAICHOUNI Date: Wed, 23 Oct 2024 23:14:28 +0200 Subject: [PATCH] ci: Workaround for 1st headless build release --- .github/workflows/build-addon.yml | 69 +++++++++++-------------------- capella_addons/__main__.py | 7 ---- 2 files changed, 25 insertions(+), 51 deletions(-) diff --git a/.github/workflows/build-addon.yml b/.github/workflows/build-addon.yml index 2392378..9d6df09 100644 --- a/.github/workflows/build-addon.yml +++ b/.github/workflows/build-addon.yml @@ -14,31 +14,25 @@ env: JVM_DIR: /usr/lib/jvm jobs: - # test: - # name: Test + # quality: + # name: Ensure code quality # runs-on: ubuntu-latest # steps: - # - name: Test - # run: |- - quality: - name: Ensure code quality - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - name: Install pre-commit - run: |- - python -m pip install pre-commit - - name: Run pre-commit - run: |- - pre-commit run --all-files - setup-build-environment: + # - name: Checkout repository + # uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + # - name: Set up Python + # uses: actions/setup-python@v5 + # with: + # python-version: "3.12" + # - name: Install pre-commit + # run: |- + # python -m pip install pre-commit + # - name: Run pre-commit + # run: |- + # pre-commit run --all-files + build-addons: strategy: matrix: capella: @@ -55,11 +49,14 @@ jobs: # jdk: # name: "jdk-17.0.11+9" # url: "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_linux_hotspot_17.0.11_9.tar.gz" - name: Setup build environment for Capella ${{ matrix.capella.version }} - needs: [quality] + addon: + - rest-api + name: Setup build environment for Capella ${{ matrix.capella.version }} and build addon ${{ matrix.addon }} + # needs: [quality] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python @@ -74,7 +71,7 @@ jobs: ghcr.io/dsd-dbs/capella-dockerimages/capella/remote:${{ matrix.capella.version }}-selected-dropins-main \ bash -c "cp -r /opt/capella /tmp/capella_${{ matrix.capella.version }}" fi - - name: Install JDKs + - name: Install JDK run: |- JVM_DIR=/usr/lib/jvm TMP_JDK=/tmp/jdk.tar.gz @@ -99,22 +96,6 @@ jobs: fi tar xzf jdtls.tar.gz rm *.tar.gz - build-addons: - name: Build addons - needs: [quality, setup-build-environment] - runs-on: ubuntu-latest - strategy: - matrix: - capella_version: - - '6.0.0' - # - '6.1.0' - # - '7.0.0' - addon: - - rest-api - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # - name: Install `capella-addons` CLI tool # run: |- # pip install . @@ -128,7 +109,7 @@ jobs: python ../capella_addons/__main__.py build-classpath \ --java-execution-environment=JavaSE-17 \ $(find . -type f -name "Main.java") \ - /tmp/capella_${{ matrix.capella_version }} + /tmp/capella_${{ matrix.capella.version }} cat .classpath - name: Build workspace run: |- diff --git a/capella_addons/__main__.py b/capella_addons/__main__.py index 265c16e..2f25ca8 100644 --- a/capella_addons/__main__.py +++ b/capella_addons/__main__.py @@ -18,8 +18,6 @@ import lxml.builder import lxml.etree -import capella_addons - logging.basicConfig(level=logging.INFO, format="%(levelname)s - %(message)s") logger = logging.getLogger(__name__) response_stdout_generator = itertools.count(1) @@ -61,11 +59,6 @@ class BuildWorkspaceStatus(Enum): @click.group() -@click.version_option( - version=capella_addons.__version__, - prog_name="eclipse-plugin-builders", - message="%(prog)s %(version)s", -) @click.option( "-v", "--verbose",