Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 71 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,68 @@ jobs:
build:
if: github.repository == 'apache/cloudstack'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
architecture: 'x64'

- name: Install Build Dependencies
run: |
sudo apt-get update
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

- name: Env details
run: |
uname -a
whoami
javac -version
mvn -v
python3 --version
free -m
nproc

- name: Build with Maven
run: |
mvn -B -P developer,systemvm -Dsimulator clean install -DskipTests=true -T$(nproc)

- name: Package build output
run: |
paths=($(find . -type d -name target))
for p in engine/schema/dist systemvm/dist; do
[ -d "$p" ] && paths+=("$p")
done
tar --zstd -cf target-output.tar.zst "${paths[@]}"
tar --zstd -cf m2-cloudstack.tar.zst -C "$HOME" .m2/repository/org/apache/cloudstack
tar --zstd -cf marvin-dist.tar.zst tools/marvin/dist

- name: Upload build output
uses: actions/upload-artifact@v4
with:
name: simulator-ci-build-output
path: |
target-output.tar.zst
m2-cloudstack.tar.zst
marvin-dist.tar.zst
retention-days: 1
compression-level: 0

test:
if: github.repository == 'apache/cloudstack'
needs: build
runs-on: ubuntu-24.04

strategy:
fail-fast: false
Expand Down Expand Up @@ -286,9 +348,16 @@ jobs:
sudo systemctl restart mysql
sudo mysql -uroot -e "SELECT VERSION();"

- name: Build with Maven
- name: Download build output
uses: actions/download-artifact@v4
with:
name: simulator-ci-build-output

- name: Extract build output
run: |
mvn -B -P developer,systemvm -Dsimulator clean install -DskipTests=true -T$(nproc)
tar --zstd -xf target-output.tar.zst
tar --zstd -xf m2-cloudstack.tar.zst -C "$HOME"
tar --zstd -xf marvin-dist.tar.zst

- name: Setup Simulator Prerequisites
run: |
Expand Down
Loading