Skip to content

Commit

Permalink
Publishing CI artifacts (JeanPhilippeKernel#374)
Browse files Browse the repository at this point in the history
* published windows artifact

* fixed typo

* fixed engine path

* templating  CI build

* fixed CI

* fixed workflow call

* fixed workflow name

* attempt to fix workflow path

* dummy linux build

* fixed window workflow path

* added version

* added version

* reworked files

* updated refs

* fixed versions

* removed versions

* fixed typo

* fixed job name

* fixed publish artifacts

* fixed job name

* fixed format

* fixed name

* fixed jobs

* updated published artefacts

* connected deploy windows

* added macos build ci

* fixed macOS CI

* updated run tests

* fixed memory test case

* make test executable

* updated action version

* fixed pipeline macOS CI

* fixed failure
  • Loading branch information
JeanPhilippeKernel authored Aug 21, 2024
1 parent 9935bcc commit 9579325
Show file tree
Hide file tree
Showing 13 changed files with 288 additions and 85 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/Engine-CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]

jobs:
windows:
uses: ./.github/workflows/windows-build.yml

macOS:
uses: ./.github/workflows/macOS-build.yml

# linux:
# uses: ./.github/workflows/linux-build.yml
38 changes: 38 additions & 0 deletions .github/workflows/job-cmakebuild-macOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# CMake build of ZEngine for macOS
#
name: ZEngine macOS Workflow

on:
workflow_call:
inputs:
configuration:
type: string
default: 'Debug'
architecture:
type: string
default: 'x64'

jobs:
cmake-build:
name: cmake-build-macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
runs-on: ${{ inputs.architecture == 'x64' && 'macos-13' || 'macos-latest' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: CMake Build
run: .\Scripts\BuildEngine.ps1 -Configurations ${{inputs.configuration}}
shell: pwsh

- name: Publish Build Artifacts
uses: actions/upload-artifact@v4
with:
name: Build-macOS-${{ inputs.architecture }}-${{inputs.configuration}}
path: |
Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/net6.0/osx-${{ inputs.architecture }}/publish/
Result.Darwin.x64.${{inputs.configuration}}/__externals/Vulkan-Loader/loader/${{ inputs.configuration }}/
Result.Darwin.x64.${{inputs.configuration}}/ZEngine/tests/${{inputs.configuration}}/
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.CSharp.resources.dll
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.CSharp.Scripting.resources.dll
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.resources.dll
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.Scripting.resources.dll
35 changes: 35 additions & 0 deletions .github/workflows/job-cmakebuild-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# CMake build of ZEngine for Windows
#
name: Windows Build Workflow

on:
workflow_call:
inputs:
configuration:
type: string
default: 'Debug'

jobs:
cmake-build:
name: cmake-build-windows-${{ inputs.configuration }}
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: CMake Build
run: .\Scripts\BuildEngine.ps1 -Configurations ${{inputs.configuration}}
shell: pwsh

- name: Publish Build Artifacts
uses: actions/upload-artifact@v4
with:
name: Build-Windows-x64-${{inputs.configuration}}
path: |
Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/win-x64/publish/
Result.Windows.x64.MultiConfig/ZEngine/tests/${{inputs.configuration}}/
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.CSharp.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.CSharp.Scripting.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.Scripting.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/**/createdump.exe
29 changes: 29 additions & 0 deletions .github/workflows/job-deploy-macOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Deploy for macOS
#
name: macOS Deploy Workflow

on:
workflow_call:
inputs:
configuration:
type: string
default: 'Release'
architecture:
type: string
default: 'x64'

jobs:
deploy:
name: deploy-macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
runs-on: ${{ inputs.architecture == 'x64' && 'macos-13' || 'macos-latest' }}
steps:
- uses: actions/download-artifact@v4
with:
path: Result.Darwin.x64.${{ inputs.configuration }}
name: Build-macOS-${{ inputs.architecture }}-Release

- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
path: Result.Darwin.x64.${{ inputs.configuration }}/Panzerfaust/${{ inputs.configuration }}/net6.0/osx-${{ inputs.architecture }}/publish/
26 changes: 26 additions & 0 deletions .github/workflows/job-deploy-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Deploy for Windows
#
name: Windows Deploy Workflow

on:
workflow_call:
inputs:
configuration:
type: string
default: 'Release'

jobs:
deploy:
name: deploy-windows-x64-${{ inputs.configuration }}
runs-on: windows-2022
steps:
- uses: actions/download-artifact@v4
with:
path: Result.Windows.x64.MultiConfig
name: Build-Windows-x64-Release

- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: Windows-x64-${{ inputs.configuration }}
path: Result.Windows.x64.MultiConfig/Panzerfaust/${{ inputs.configuration }}/net6.0/win-x64/publish/
34 changes: 34 additions & 0 deletions .github/workflows/job-test-macOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Run tests for macOS
#
name: macOS Test Workflow

on:
workflow_call:
inputs:
configuration:
type: string
default: 'Debug'
architecture:
type: string
default: 'x64'

jobs:
test:
name: test-macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
runs-on: ${{ inputs.architecture == 'x64' && 'macos-13' || 'macos-latest' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: Build-macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
path: Result.Darwin.x64.${{ inputs.configuration }}

- name: Update access permission of ZEngineTests
run: chmod +x ./Result.Darwin.x64.${{ inputs.configuration }}/ZEngine/tests/${{ inputs.configuration }}/ZEngineTests

- name: Run Tests
run: .\Scripts\RunTests.ps1 -Configurations ${{ inputs.configuration }}
shell: pwsh
36 changes: 36 additions & 0 deletions .github/workflows/job-test-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Run tests for Windows
#
name: Windows Test Workflow

on:
workflow_call:
inputs:
configuration:
type: string
default: 'Debug'

jobs:
test:
name: test-windows-${{ inputs.configuration }}
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: Result.Windows.x64.MultiConfig
pattern: Build-Windows-x64-*
merge-multiple: true

- name: Install Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true

- name: Run Tests
run: .\Scripts\RunTests.ps1 -Configurations ${{inputs.configuration}}
shell: pwsh
38 changes: 19 additions & 19 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# @JeanPhilippeKernel : Disabled because we only support Windows as platform for now
#
# name: ZEngine Linux Build

# on:
# push:
# branches: [ master, develop ]
# pull_request:
# branches: [ master, develop ]
# jobs:
# Linux-Build:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# buildConfiguration: [Debug, Release]

# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
name: ZEngine Linux Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
Linux-Build:
runs-on: ubuntu-latest
strategy:
matrix:
buildConfiguration: [Debug, Release]

steps:
- name: Checkout repository
uses: actions/checkout@v2

# - name: Checkout submodules
# run: git submodule update --init --recursive

Expand Down
51 changes: 25 additions & 26 deletions .github/workflows/macOS-build.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
name: ZEngine macOS Build

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
on: workflow_call

jobs:
macOS-Intel-Build:
runs-on: macos-13
cmake-build:
strategy:
matrix:
buildConfiguration: [Debug, Release]
buildConfiguration: [Debug, Release]
architecture: [x64, arm64]
uses: ./.github/workflows/job-cmakebuild-macOS.yml
with:
configuration: ${{matrix.buildConfiguration}}
architecture: ${{ matrix.architecture }}

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: CMake Build
run: .\Scripts\BuildEngine.ps1 -Configurations ${{matrix.buildConfiguration}}
shell: pwsh

macOS-Silicon-Build:
runs-on: macos-latest
test:
needs: cmake-build
strategy:
matrix:
buildConfiguration: [Debug, Release]

steps:
- name: Checkout repository
uses: actions/checkout@v2
testConfiguration: [Debug, Release]
architecture: [x64, arm64]
uses: ./.github/workflows/job-test-macOS.yml
with:
configuration: ${{matrix.testConfiguration}}
architecture: ${{ matrix.architecture }}

- name: CMake Build
run: .\Scripts\BuildEngine.ps1 -Configurations ${{matrix.buildConfiguration}}
shell: pwsh
deploy:
needs: test
strategy:
matrix:
architecture: [x64, arm64]
uses: ./.github/workflows/job-deploy-macOS.yml
with:
configuration: Release
architecture: ${{ matrix.architecture }}
38 changes: 0 additions & 38 deletions .github/workflows/window-build.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: ZEngine Window Build

on: workflow_call

jobs:
cmake-build:
strategy:
matrix:
buildConfiguration: [Debug, Release]
uses: ./.github/workflows/job-cmakebuild-windows.yml
with:
configuration: ${{matrix.buildConfiguration}}

test:
needs: cmake-build
strategy:
matrix:
testConfiguration: [Debug, Release]
uses: ./.github/workflows/job-test-windows.yml
with:
configuration: ${{matrix.testConfiguration}}

deploy:
needs: test
uses: ./.github/workflows/job-deploy-windows.yml
with:
configuration: Release
Loading

0 comments on commit 9579325

Please sign in to comment.