Skip to content

Commit 0290f32

Browse files
committed
Add Bob's reusable workflow. Add dependabot configuration
1 parent b7eb069 commit 0290f32

File tree

3 files changed

+161
-1
lines changed

3 files changed

+161
-1
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"

.github/workflows/bob.yml

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
name: Build with bob
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
ubuntu_runner:
7+
required: false
8+
type: string
9+
description: 'Which Ubuntu runner should use'
10+
default: ubuntu-latest
11+
macos_runner:
12+
required: false
13+
type: string
14+
description: 'Which MacOS runner should use'
15+
default: 'macOSlatest'
16+
windows_runner:
17+
required: false
18+
type: string
19+
description: 'Which Windows runner should use'
20+
default: windows-latest
21+
build_server:
22+
required: false
23+
type: string
24+
description: 'Buld server url'
25+
default: 'https://build-stage.defold.com'
26+
channel:
27+
required: false
28+
type: choice
29+
description: 'Which Defold version use to build. Possible values: alpha, beta, stable'
30+
options:
31+
- alpha
32+
- beta
33+
- stable
34+
default: alpha
35+
bob_version_filename:
36+
required: false
37+
type: string
38+
description: 'JSON filename withi Bob versions'
39+
default: 'info.json'
40+
41+
jobs:
42+
build_with_bob:
43+
strategy:
44+
matrix:
45+
platform: [armv7-android, x86_64-linux, js-web]
46+
runs-on: ${{ inputs.ubuntu_runner }}
47+
48+
name: Build
49+
steps:
50+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
51+
- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
52+
with:
53+
java-version: '21.0.5+11.0.LTS'
54+
architecture: x64
55+
distribution: 'temurin'
56+
57+
- name: Get Defold version
58+
id: defold_version
59+
run: |
60+
TMPVAR=`curl -s http://d.defold.com/${{ inputs.channel }}/${{ inputs.bob_version_filename }} | jq -r '.sha1'`
61+
echo "defold_version=${TMPVAR}" >> $GITHUB_OUTPUT
62+
echo "Found version ${TMPVAR}"
63+
64+
- name: Download bob.jar
65+
run: |
66+
wget -q http://d.defold.com/archive/${{ inputs.channel }}/${{ steps.defold_version.outputs.defold_version }}/bob/bob.jar
67+
java -jar bob.jar --version
68+
69+
- name: Installing Shared Library Dependencies
70+
run: |
71+
echo "Remove after we've fixed the headless build for plugins"
72+
sudo add-apt-repository ppa:apt-fast/stable
73+
sudo apt-get update
74+
sudo apt-fast install -y --no-install-recommends libopenal-dev libgl1-mesa-dev libglw1-mesa-dev freeglut3-dev
75+
76+
- name: Resolve libraries
77+
run: java -jar bob.jar resolve
78+
- name: Build
79+
run: java -jar bob.jar --platform=${{ matrix.platform }} build --archive --build-server=${{ inputs.build_server }}
80+
- name: Bundle
81+
run: java -jar bob.jar --platform=${{ matrix.platform }} bundle
82+
83+
build_with_bob_windows:
84+
strategy:
85+
matrix:
86+
platform: [x86_64-win32, x86-win32]
87+
runs-on: ${{ inputs.windows_runner }}
88+
89+
name: Build
90+
steps:
91+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
92+
- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
93+
with:
94+
java-version: '21.0.5+11.0.LTS'
95+
architecture: x64
96+
distribution: 'temurin'
97+
98+
- name: Get Defold version
99+
id: defold_version
100+
run: |
101+
TMPVAR=`curl -s http://d.defold.com/${{ inputs.channel }}/${{ inputs.bob_version_filename }} | jq -r '.sha1'`
102+
echo "defold_version=${TMPVAR}" >> $GITHUB_OUTPUT
103+
echo "Found version ${TMPVAR}"
104+
shell: bash
105+
106+
- name: Download bob.jar
107+
run: |
108+
curl -s -o bob.jar http://d.defold.com/archive/${{ inputs.channel }}/${{ steps.defold_version.outputs.defold_version }}/bob/bob.jar
109+
java -jar bob.jar --version
110+
111+
- name: Resolve libraries
112+
run: java -jar bob.jar resolve
113+
- name: Build
114+
run: java -jar bob.jar --platform=${{ matrix.platform }} build --archive --build-server=${{ inputs.build_server }}
115+
- name: Bundle
116+
run: java -jar bob.jar --platform=${{ matrix.platform }} bundle
117+
118+
# macOS is not technically needed for building, but we want to test bundling as well, since we're also testing the manifest merging
119+
build_with_bob_macos:
120+
strategy:
121+
matrix:
122+
platform: [arm64-macos, x86_64-macos]
123+
runs-on: macOS-latest
124+
125+
name: Build
126+
steps:
127+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
128+
- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
129+
with:
130+
java-version: '21.0.5+11.0.LTS'
131+
architecture: x64
132+
distribution: 'temurin'
133+
134+
- name: Get Defold version
135+
id: defold_version
136+
run: |
137+
TMPVAR=`curl -s http://d.defold.com/${{ inputs.channel }}/${{ inputs.bob_version_filename }} | jq -r '.sha1'`
138+
echo "defold_version=${TMPVAR}" >> $GITHUB_OUTPUT
139+
echo "Found version ${TMPVAR}"
140+
141+
- name: Download bob.jar
142+
run: |
143+
wget -q http://d.defold.com/archive/${{ inputs.channel }}/${{ steps.defold_version.outputs.defold_version }}/bob/bob.jar
144+
java -jar bob.jar --version
145+
146+
- name: Resolve libraries
147+
run: java -jar bob.jar resolve
148+
- name: Build
149+
run: java -jar bob.jar --platform=${{ matrix.platform }} build --archive --build-server=${{ inputs.build_server }}
150+
- name: Bundle
151+
run: java -jar bob.jar --platform=${{ matrix.platform }} bundle

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
# github-actions-common
1+
# github-actions-common
2+
3+
Repository contains set of reusable Github workflows which can be used in different repositories as utility stuff.

0 commit comments

Comments
 (0)