add debugging to build.yml #526
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push ,workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Display Machine Details | |
run: | | |
echo "--- Runner Machine Details (Job: build) ---" | |
echo "Hostname: $(hostname)" | |
echo "OS/Kernel: $(uname -a)" | |
echo "CPU Cores: $(nproc)" | |
echo "CPU Model: $(lscpu | grep 'Model name' | sed 's/Model name:[[:space:]]*//')" | |
echo "Total Memory: $(free -h | grep Mem | awk '{print $2}')" | |
echo "------------------------------------------" | |
- name: Confirm Saxon CLI class is in the JAR | |
run: jar tf utilities/saxon9he/saxon9he.jar | grep net/sf/saxon/Transform.class || echo "Transform.class not found" | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 8 | |
java-package: jdk | |
- name: Dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y aspell libreoffice pandoc | |
- name: Build | |
env: | |
REALTA_USERNAME: ${{ secrets.REALTA_USERNAME }} | |
REALTA_PASSWORD: ${{ secrets.REALTA_PASSWORD }} | |
run: | | |
mkdir target | |
timestamp=$(date -u +%Y%m%d-%H%M) | |
echo "TIMESTAMP=${timestamp}" >>$GITHUB_ENV | |
bash build.sh target github ${timestamp}z "${REALTA_USERNAME:-}" "${REALTA_PASSWORD:-}" DELETE-REPOSITORY-FILES-AS-WELL | |
- name: List Shell Build Directory Structure | |
if: always() | |
run: | | |
echo "=== Shell Build Directory Structure ===" | |
echo "Current directory: $(pwd)" | |
echo "" | |
echo "--- Root directory contents ---" | |
ls -lah | |
echo "" | |
echo "--- Tree view of all directories (if target exists) ---" | |
if [ -d target ]; then | |
find target -type d | sort | |
echo "" | |
echo "--- File count in each directory ---" | |
find target -type d -exec sh -c 'echo "{}": $(find "{}" -maxdepth 1 -type f | wc -l) files' \; | |
else | |
echo "target directory does not exist (expected after cleanup)" | |
fi | |
echo "" | |
echo "--- Zip files in root ---" | |
ls -lh *.zip 2>/dev/null || echo "No zip files found" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: UBL-package-github-${{ env.TIMESTAMP }}z | |
path: ./* | |
#path: target/artefacts-UBL-2.3-github-${{ env.TIMESTAMP }}z/* | |
#name: all-UBL-2.3-github-${{ env.TIMESTAMP }}z | |
#path: ./* | |
build-py: | |
if: github.ref == 'refs/heads/ubl-2.5-python' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Display Machine Details | |
run: | | |
echo "--- Runner Machine Details (Job: build) ---" | |
echo "Hostname: $(hostname)" | |
echo "OS/Kernel: $(uname -a)" | |
echo "CPU Cores: $(nproc)" | |
echo "CPU Model: $(lscpu | grep 'Model name' | sed 's/Model name:[[:space:]]*//')" | |
echo "Total Memory: $(free -h | grep Mem | awk '{print $2}')" | |
echo "------------------------------------------" | |
- name: Confirm Saxon CLI class is in the JAR | |
run: jar tf utilities/saxon9he/saxon9he.jar | grep net/sf/saxon/Transform.class || echo "Transform.class not found" | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 8 | |
java-package: jdk | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y aspell libreoffice pandoc | |
- name: Build | |
env: | |
REALTA_USERNAME: ${{ secrets.REALTA_USERNAME }} | |
REALTA_PASSWORD: ${{ secrets.REALTA_PASSWORD }} | |
run: | | |
mkdir target-py | |
timestamp=$(date -u +%Y%m%d-%H%M) | |
echo "TIMESTAMP=${timestamp}" >>$GITHUB_ENV | |
python build.py target-py github ${timestamp}z "${REALTA_USERNAME:-}" "${REALTA_PASSWORD:-}" DELETE-REPOSITORY-FILES-AS-WELL | |
- name: List Python Build Directory Structure | |
if: always() | |
run: | | |
echo "=== Python Build Directory Structure ===" | |
echo "Current directory: $(pwd)" | |
echo "" | |
echo "--- Root directory contents ---" | |
ls -lah | |
echo "" | |
echo "--- Tree view of all directories (if target-py exists) ---" | |
if [ -d target-py ]; then | |
find target-py -type d | sort | |
echo "" | |
echo "--- File count in each directory ---" | |
find target-py -type d -exec sh -c 'echo "{}": $(find "{}" -maxdepth 1 -type f | wc -l) files' \; | |
else | |
echo "target-py directory does not exist (expected after cleanup)" | |
fi | |
echo "" | |
echo "--- Zip files in root ---" | |
ls -lh *.7z 2>/dev/null || echo "No zip files found" | |
echo "" | |
echo "--- Check what 7z thinks is in the ISO 7z ---" | |
if [ -f "UBL-2.5-csd01-${TIMESTAMP}z-iso-iec-19845.7z" ]; then | |
7z l "UBL-2.5-csd01-${TIMESTAMP}z-iso-iec-19845.7z" | |
fi | |
echo "" | |
echo "--- Check what 7z thinks is in the main 7z ---" | |
if [ -f "UBL-2.5-csd01-${TIMESTAMP}z.7z" ]; then | |
7z l "UBL-2.5-csd01-${TIMESTAMP}z.7z" | head -50 | |
fi | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: UBL-package-py-github-${{ env.TIMESTAMP }}z | |
path: ./* | |
#path: target/artefacts-UBL-2.3-github-${{ env.TIMESTAMP }}z/* | |
#name: all-UBL-2.3-github-${{ env.TIMESTAMP }}z | |
#path: ./* |