Skip to content

Commit 99dc4e0

Browse files
authored
Updated all GitHub workflows (#191)
* All platforms have a dedicated workflow. * All platforms have dedicated caches. * Improved discord notification messages. * Updated the readme to quickly check build status.
1 parent 7155051 commit 99dc4e0

15 files changed

+165
-352
lines changed

.github/actions/ibt-workspace-init/action.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/build-dispatch.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ on:
77
description: "Host platform for the build to take place."
88
required: true
99
type: string
10-
target:
11-
description: "Target to be build. (separated by spaces)"
10+
target-platform:
11+
description: "Target platform for which to build. If set no other platforms will be initialized."
12+
required: false
13+
default: 'all'
14+
type: string
15+
targets:
16+
description: "Targets to be build. (separated by spaces)"
1217
required: true
1318
type: string
1419
clang-version:
@@ -18,14 +23,14 @@ on:
1823

1924
jobs:
2025
build:
21-
name: Build (${{ inputs.target }})
26+
name: Build (${{ inputs.targets }})
2227
runs-on: ${{ inputs.host-platform }}
2328
steps:
2429
- name: Checkout Source Code
2530
uses: actions/checkout@v4
2631

2732
- name: Setup Clang ${{ inputs.clang-version }} (ubuntu-only)
28-
if: ${{ inputs.host-platform == 'ubuntu-latest' }}
33+
if: ${{ inputs.host-platform == 'ubuntu-latest' && inputs.clang-version != '' }}
2934
run: |
3035
wget https://apt.llvm.org/llvm.sh
3136
chmod +x llvm.sh
@@ -36,8 +41,9 @@ jobs:
3641
uses: iceshard-engine/.github/.github/actions/conan2@main
3742
with:
3843
conan-cache: true
39-
conan-cache-version: 'v1'
44+
conan-cache-version: 'v1-${{ inputs.target-platform }}'
4045
conan-config-url: https://github.com/iceshard-engine/conan-config.git
46+
conan-modify-profile: ${{ contains(inputs.host-platform, 'ubuntu') }}
4147
conan-profile-compiler: 'clang'
4248
conan-profile-compiler-version: '${{ inputs.clang-version }}'
4349
conan-profile-cppstd: '20'
@@ -47,12 +53,11 @@ jobs:
4753
uses: iceshard-engine/.github/.github/actions/ibt-wks@main
4854
with:
4955
script_basename: 'ice'
50-
platform-android: ${{ contains(inputs.target, 'android') }}
51-
platform-web: ${{ contains(inputs.target, 'webasm') }}
56+
target-platform: ${{ inputs.target-platform }}
5257
workspace-cache: true
53-
workspace-cache-version: 'v1'
58+
workspace-cache-version: 'v1-${{ inputs.target-platform }}'
5459

5560
# Building the actual target
56-
- name: Build Target (${{ inputs.target }})
61+
- name: Build Targets (${{ inputs.targets }})
5762
shell: pwsh
58-
run: ./ibt-ci build -t ${{ inputs.target }}
63+
run: ./ibt-ci build ${{ inputs.targets }}

.github/workflows/build-manual.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Code Validation (Android)
2+
run-name: Code Validation (Android, ${{ github.ref_name }})
3+
4+
on:
5+
push:
6+
paths:
7+
- 'source/**'
8+
- '.github/workflows/build-dispatch.yaml'
9+
- '.github/workflows/build-validate-android.yaml'
10+
- '!source/data/**'
11+
workflow_dispatch:
12+
13+
jobs:
14+
validate:
15+
name: Validate (${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }})
16+
uses: ./.github/workflows/build-dispatch.yaml
17+
strategy:
18+
matrix:
19+
project: [all]
20+
pipeline: [Android29-ARMv8, Android29-x64]
21+
config: [Debug,Develop,Profile,Release]
22+
with:
23+
host-platform: 'windows-latest'
24+
target-platform: 'android'
25+
targets: "${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }}"

.github/workflows/build-validate-code.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Code Validation (Emscripten)
2+
run-name: Code Validation (Emscripten, ${{ github.ref_name }})
3+
4+
on:
5+
push:
6+
paths:
7+
- 'source/**'
8+
- '.github/workflows/build-dispatch.yaml'
9+
- '.github/workflows/build-validate-emscripten.yaml'
10+
- '!source/data/**'
11+
workflow_dispatch:
12+
13+
jobs:
14+
validate:
15+
name: Validate (${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }})
16+
uses: ./.github/workflows/build-dispatch.yaml
17+
strategy:
18+
matrix:
19+
project: [all]
20+
pipeline: [WebAsm]
21+
config: [Debug,Develop,Profile,Release]
22+
with:
23+
host-platform: 'windows-latest'
24+
target-platform: 'web'
25+
targets: "${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }}"
26+
clang-version: '21'
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Code Validation (Linux)
2+
run-name: Code Validation (Linux, ${{ github.ref_name }})
3+
4+
on:
5+
push:
6+
paths:
7+
- 'source/**'
8+
- '.github/workflows/build-dispatch.yaml'
9+
- '.github/workflows/build-validate-linux.yaml'
10+
- '!source/data/**'
11+
workflow_dispatch:
12+
13+
jobs:
14+
validate:
15+
name: Validate (${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }})
16+
uses: ./.github/workflows/build-dispatch.yaml
17+
strategy:
18+
matrix:
19+
project: [all]
20+
pipeline: [x64]
21+
config: [Debug,Develop,Profile,Release]
22+
with:
23+
host-platform: 'ubuntu-latest'
24+
target-platform: 'linux'
25+
targets: "${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }}"
26+
clang-version: '20'
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Code Validation (Windows)
2+
run-name: Code Validation (Windows, ${{ github.ref_name }})
3+
4+
on:
5+
push:
6+
paths:
7+
- 'source/**'
8+
- '.github/workflows/build-dispatch.yaml'
9+
- '.github/workflows/build-validate-windows.yaml'
10+
- '!source/data/**'
11+
workflow_dispatch:
12+
13+
jobs:
14+
validate:
15+
name: Validate (${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }})
16+
uses: ./.github/workflows/build-dispatch.yaml
17+
strategy:
18+
matrix:
19+
project: [all]
20+
pipeline: [x64]
21+
config: [Debug,Develop,Profile,Release]
22+
with:
23+
host-platform: 'windows-latest'
24+
target-platform: 'win32'
25+
targets: "${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }}"

.github/workflows/cache-create.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/discord.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ jobs:
1111
notify_discord_commits_pushed:
1212
name: Notify discord (commits)
1313
runs-on: ubuntu-latest
14+
strategy:
15+
# Only send commits one-by-one
16+
max-parallel: 1
17+
matrix:
18+
commit: ${{ github.event.commits }}
19+
env:
20+
GHITHUB_USER_LINK: '[${{ matrix.commit.author.name }}](<https://github.com/${{ matrix.commit.author.name }}>)'
21+
GHITHUB_REPO_URL: 'https://github.com/${{ github.event.repository.full_name }}'
22+
GHITHUB_REPO_LINK: '[${{ github.event.repository.full_name }}](<https://github.com/${{ github.event.repository.full_name }}>)'
1423
steps:
1524
- name: Notify build started
1625
uses: Ilshidur/action-discord@master
@@ -19,5 +28,6 @@ jobs:
1928
DISCORD_USERNAME: 'Yuki <IceShard Engine>'
2029
with:
2130
args: |
22-
New commits have been pushed to `{{ EVENT_PAYLOAD.repository.full_name }}`!
23-
{{ EVENT_PAYLOAD.commits.map(e => '- ' + e.message + ' (<' + e.url + '>) <' + e.author.name + '>').join('\n').slice(0, 2000) }}
31+
New commit in ${{ env.GHITHUB_REPO_LINK }} on branch [{{ ('${{ github.event.ref }}').split('/').pop() }}](<${{ env.GHITHUB_REPO_URL }}/tree/{{ ('${{ github.event.ref }}').split('/').pop() }}>)
32+
-# See [changes](<${{ matrix.commit.url }}>) by ${{ env.GHITHUB_USER_LINK }} (sha: ${{ matrix.commit.id }})
33+
>>> ${{ matrix.commit.message }}

0 commit comments

Comments
 (0)