Skip to content

Commit 85d6bf8

Browse files
authored
Add GitHub Actions workflow for building all modules (#147)
- Create a `build-all.yml` GitHub Actions workflow triggered by pushes, pull requests, and manual dispatches on the `ignition-8.3` branch. - Use `actions/checkout` to fetch repository content. - Set up Azul JDK 17 via `actions/setup-java`. - Ensure `build-all.sh` is executable and run it to build all modules.
1 parent f6e7422 commit 85d6bf8

File tree

2 files changed

+43
-4
lines changed

2 files changed

+43
-4
lines changed

.github/workflows/build-all.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: build-all
2+
3+
on:
4+
push:
5+
branches: [ ignition-8.3 ]
6+
pull_request:
7+
branches: [ ignition-8.3 ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Azul JDK 17
19+
uses: actions/setup-java@v4
20+
with:
21+
distribution: 'zulu'
22+
java-version: '17'
23+
cache: maven
24+
25+
- name: Make build script executable
26+
run: chmod +x build-all.sh
27+
28+
- name: Run build-all.sh
29+
run: ./build-all.sh

build-all.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
``#!/bin/bash
1+
#!/bin/bash
22

33
# Build script for all Ignition SDK example projects
44
# Automatically detects Maven (pom.xml) or Gradle (build.gradle/build.gradle.kts) projects
55

66
set -e # Exit on any error
77

8+
# Projects to ignore (temporarily broken or excluded from builds)
9+
IGNORE_LIST=("report-datasource")
10+
811
# Color output for better readability
912
RED='\033[0;31m'
1013
GREEN='\033[0;32m'
@@ -18,7 +21,7 @@ successful_builds=()
1821
failed_builds=()
1922

2023
# Get list of directories (excluding hidden and special directories)
21-
directories=$(find . -maxdepth 1 -type d ! -name "." ! -name "..*" ! -name ".git" ! -name ".idea" | sort)
24+
directories=$(find . -maxdepth 1 -type d ! -name "." ! -name "..*" ! -name ".git" ! -name ".github" ! -name ".idea" | sort)
2225

2326
echo -e "${BLUE}========================================${NC}"
2427
echo -e "${BLUE}Building All Ignition SDK Examples${NC}"
@@ -28,14 +31,21 @@ echo ""
2831
for dir in $directories; do
2932
project_name=$(basename "$dir")
3033

34+
# Check if project is in ignore list
35+
if [[ " ${IGNORE_LIST[@]} " =~ " ${project_name} " ]]; then
36+
echo -e "${YELLOW}⚠ Skipping ${project_name} (in ignore list)${NC}"
37+
echo ""
38+
continue
39+
fi
40+
3141
echo -e "${YELLOW}>>> Building: ${project_name}${NC}"
3242

3343
cd "$dir"
3444

3545
# Detect project type and build accordingly
3646
if [ -f "pom.xml" ]; then
3747
echo -e "${BLUE}Detected Maven project${NC}"
38-
if mvn clean package; then
48+
if mvn clean package -B -q; then
3949
echo -e "${GREEN}${project_name} built successfully${NC}"
4050
successful_builds+=("$project_name")
4151
else
@@ -45,7 +55,7 @@ for dir in $directories; do
4555
fi
4656
elif [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]; then
4757
echo -e "${BLUE}Detected Gradle project${NC}"
48-
if ./gradlew clean build; then
58+
if ./gradlew clean build -q --console=plain; then
4959
echo -e "${GREEN}${project_name} built successfully${NC}"
5060
successful_builds+=("$project_name")
5161
else

0 commit comments

Comments
 (0)