|
30 | 30 | build: |
31 | 31 | if: github.repository == 'apache/cloudstack' |
32 | 32 | runs-on: ubuntu-24.04 |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@v5 |
| 35 | + with: |
| 36 | + fetch-depth: 0 |
| 37 | + |
| 38 | + - name: Set up JDK 17 |
| 39 | + uses: actions/setup-java@v5 |
| 40 | + with: |
| 41 | + distribution: 'temurin' |
| 42 | + java-version: '17' |
| 43 | + cache: 'maven' |
| 44 | + |
| 45 | + - name: Set up Python |
| 46 | + uses: actions/setup-python@v6 |
| 47 | + with: |
| 48 | + python-version: '3.10' |
| 49 | + architecture: 'x64' |
| 50 | + |
| 51 | + - name: Install Build Dependencies |
| 52 | + run: | |
| 53 | + sudo apt-get update |
| 54 | + sudo apt-get install -y git uuid-runtime genisoimage netcat-openbsd ipmitool build-essential libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 ipmitool libpython3-dev libssl-dev libffi-dev python3-openssl python3-dev python3-setuptools |
| 55 | +
|
| 56 | + - name: Env details |
| 57 | + run: | |
| 58 | + uname -a |
| 59 | + whoami |
| 60 | + javac -version |
| 61 | + mvn -v |
| 62 | + python3 --version |
| 63 | + free -m |
| 64 | + nproc |
| 65 | +
|
| 66 | + - name: Build with Maven |
| 67 | + run: | |
| 68 | + mvn -B -P developer,systemvm -Dsimulator clean install -DskipTests=true -T$(nproc) |
| 69 | +
|
| 70 | + - name: Package build output |
| 71 | + run: | |
| 72 | + paths=($(find . -type d -name target)) |
| 73 | + for p in engine/schema/dist systemvm/dist; do |
| 74 | + [ -d "$p" ] && paths+=("$p") |
| 75 | + done |
| 76 | + tar --zstd -cf target-output.tar.zst "${paths[@]}" |
| 77 | + tar --zstd -cf m2-cloudstack.tar.zst -C "$HOME" .m2/repository/org/apache/cloudstack |
| 78 | + tar --zstd -cf marvin-dist.tar.zst tools/marvin/dist |
| 79 | +
|
| 80 | + - name: Upload build output |
| 81 | + uses: actions/upload-artifact@v4 |
| 82 | + with: |
| 83 | + name: simulator-ci-build-output |
| 84 | + path: | |
| 85 | + target-output.tar.zst |
| 86 | + m2-cloudstack.tar.zst |
| 87 | + marvin-dist.tar.zst |
| 88 | + retention-days: 1 |
| 89 | + compression-level: 0 |
| 90 | + |
| 91 | + test: |
| 92 | + if: github.repository == 'apache/cloudstack' |
| 93 | + needs: build |
| 94 | + runs-on: ubuntu-24.04 |
33 | 95 |
|
34 | 96 | strategy: |
35 | 97 | fail-fast: false |
@@ -286,9 +348,16 @@ jobs: |
286 | 348 | sudo systemctl restart mysql |
287 | 349 | sudo mysql -uroot -e "SELECT VERSION();" |
288 | 350 |
|
289 | | - - name: Build with Maven |
| 351 | + - name: Download build output |
| 352 | + uses: actions/download-artifact@v4 |
| 353 | + with: |
| 354 | + name: simulator-ci-build-output |
| 355 | + |
| 356 | + - name: Extract build output |
290 | 357 | run: | |
291 | | - mvn -B -P developer,systemvm -Dsimulator clean install -DskipTests=true -T$(nproc) |
| 358 | + tar --zstd -xf target-output.tar.zst |
| 359 | + tar --zstd -xf m2-cloudstack.tar.zst -C "$HOME" |
| 360 | + tar --zstd -xf marvin-dist.tar.zst |
292 | 361 |
|
293 | 362 | - name: Setup Simulator Prerequisites |
294 | 363 | run: | |
|
0 commit comments