From 2ecf263bbd7508ff10e66f35a34623cf4217799b Mon Sep 17 00:00:00 2001 From: Dariusz Jarosz Date: Wed, 19 Nov 2025 14:47:39 -0600 Subject: [PATCH 1/4] Add simple build file. --- .github/workflows/build-simple.yml | 118 +++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 .github/workflows/build-simple.yml diff --git a/.github/workflows/build-simple.yml b/.github/workflows/build-simple.yml new file mode 100644 index 000000000..a88962884 --- /dev/null +++ b/.github/workflows/build-simple.yml @@ -0,0 +1,118 @@ +name: Build (Simple) + +on: + push: + branches: [ master, main, develop ] + pull_request: + branches: [ master, main, develop ] + workflow_dispatch: + +jobs: + build-java: + runs-on: ubuntu-latest + + strategy: + matrix: + java-version: ['11', '17'] + + steps: + - uses: actions/checkout@v3 + + - name: Set up Java ${{ matrix.java-version }} + uses: actions/setup-java@v3 + with: + java-version: ${{ matrix.java-version }} + distribution: 'temurin' + + - name: Install build dependencies + run: | + sudo apt-get update + sudo apt-get install -y ant + + - name: Build Java Portal + run: | + cd src/java/LogrPortal + # Create minimal build properties for CI + mkdir -p nbproject/private + cat > nbproject/private/private.properties.generic.build << 'EOF' + # Build properties for CI environment + user.properties.file=${user.home}/.netbeans/8.2/build.properties + EOF + + # Attempt to build with ant + ant -version + ant clean || true + ant dist || true + continue-on-error: true + + - name: Upload Java build artifacts + if: always() + uses: actions/upload-artifact@v3 + with: + name: java-build-java${{ matrix.java-version }} + path: | + src/java/LogrPortal/dist/ + src/java/LogrPortal/build/ + retention-days: 5 + if-no-files-found: ignore + + build-python: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel + + - name: Build Python package + run: | + cd src/python + python setup.py build + python setup.py sdist bdist_wheel + continue-on-error: true + + - name: Upload Python build artifacts + if: always() + uses: actions/upload-artifact@v3 + with: + name: python-build + path: | + src/python/dist/ + src/python/build/ + retention-days: 5 + if-no-files-found: ignore + + lint-python: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install linting tools + run: | + python -m pip install --upgrade pip + pip install flake8 pylint + + - name: Lint with flake8 + run: | + # Stop the build if there are Python syntax errors or undefined names + flake8 src/python --count --select=E9,F63,F7,F82 --show-source --statistics || true + # Exit-zero treats all errors as warnings + flake8 src/python --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics || true + + - name: Lint with pylint + run: | + pylint src/python --disable=all --enable=E,F || true From 521b97aca762726507fe05e363e427c9d1901003 Mon Sep 17 00:00:00 2001 From: Dariusz Jarosz Date: Wed, 19 Nov 2025 14:52:33 -0600 Subject: [PATCH 2/4] Update version --- .github/workflows/build-simple.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-simple.yml b/.github/workflows/build-simple.yml index a88962884..1d728a9f4 100644 --- a/.github/workflows/build-simple.yml +++ b/.github/workflows/build-simple.yml @@ -47,7 +47,7 @@ jobs: - name: Upload Java build artifacts if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: java-build-java${{ matrix.java-version }} path: | @@ -81,7 +81,7 @@ jobs: - name: Upload Python build artifacts if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: python-build path: | @@ -116,3 +116,4 @@ jobs: - name: Lint with pylint run: | pylint src/python --disable=all --enable=E,F || true + From f6c06c1613e4422aed9cbd51aebc931232dddefc Mon Sep 17 00:00:00 2001 From: Dariusz Jarosz Date: Wed, 19 Nov 2025 14:57:32 -0600 Subject: [PATCH 3/4] Only build the portal and do not allow failure. --- .github/workflows/build-simple.yml | 65 +----------------------------- 1 file changed, 1 insertion(+), 64 deletions(-) diff --git a/.github/workflows/build-simple.yml b/.github/workflows/build-simple.yml index 1d728a9f4..b2dc76a27 100644 --- a/.github/workflows/build-simple.yml +++ b/.github/workflows/build-simple.yml @@ -43,7 +43,7 @@ jobs: ant -version ant clean || true ant dist || true - continue-on-error: true + continue-on-error: false - name: Upload Java build artifacts if: always() @@ -53,67 +53,4 @@ jobs: path: | src/java/LogrPortal/dist/ src/java/LogrPortal/build/ - retention-days: 5 - if-no-files-found: ignore - - build-python: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel - - - name: Build Python package - run: | - cd src/python - python setup.py build - python setup.py sdist bdist_wheel - continue-on-error: true - - - name: Upload Python build artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: python-build - path: | - src/python/dist/ - src/python/build/ - retention-days: 5 - if-no-files-found: ignore - - lint-python: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - - name: Install linting tools - run: | - python -m pip install --upgrade pip - pip install flake8 pylint - - - name: Lint with flake8 - run: | - # Stop the build if there are Python syntax errors or undefined names - flake8 src/python --count --select=E9,F63,F7,F82 --show-source --statistics || true - # Exit-zero treats all errors as warnings - flake8 src/python --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics || true - - - name: Lint with pylint - run: | - pylint src/python --disable=all --enable=E,F || true From 840fa15193cab9f81d34ce7255ed52fbea911edb Mon Sep 17 00:00:00 2001 From: Dariusz Jarosz Date: Wed, 19 Nov 2025 14:59:00 -0600 Subject: [PATCH 4/4] Do not proceed if failure. --- .github/workflows/build-simple.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-simple.yml b/.github/workflows/build-simple.yml index b2dc76a27..6a2c2f1df 100644 --- a/.github/workflows/build-simple.yml +++ b/.github/workflows/build-simple.yml @@ -41,8 +41,8 @@ jobs: # Attempt to build with ant ant -version - ant clean || true - ant dist || true + ant clean + ant dist continue-on-error: false - name: Upload Java build artifacts