run with 4 cores on github #517
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 | |
- 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 | |
- 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: ./* |