Skip to content

removing serial build #104

removing serial build

removing serial build #104

Workflow file for this run

name: CI
# Controls when the workflow will run
on:
create:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
ReleaseType:
description: 'Release or Debug'
required: true
default: 'Release'
jobs:
Build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
- os: ubuntu-latest
- os: windows-latest
architecture: x64
- os: windows-latest
architecture: x86
- os: windows-latest
architecture: ARM64
- os: windows-latest
architecture: ARM
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Setup .NET
if: matrix.os == 'windows-latest'
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Build source package
if: matrix.os == 'windows-latest'
run: dotnet pack -c Release ImGui.NET.SourceBuild.csproj
shell: bash
- name: Upload source package
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
with:
name: win-x64
path: bin\Packages\Release\*.nupkg
- name: Publish untagged source package to MyGet
if: matrix.os == 'windows-latest' && github.ref == 'refs/heads/master'
run: dotnet nuget push bin\Packages\Release\*.nupkg -s https://www.myget.org/F/mellinoe/api/v3/index.json --api-key ${{secrets.MYGET_KEY}}
- name: Publish tagged source package release to nuget.org
if: matrix.os == 'windows-latest' && startsWith(github.ref, 'refs/tags/')
run: dotnet nuget push bin\Packages\Release\*.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_KEY}}
- name: Build ${{ github.event.inputs.ReleaseType || 'Release' }}
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
./ci-build.cmd ${{ github.event.inputs.ReleaseType || 'Release' }} ${{ matrix.architecture }}
else
./ci-build.sh ${{ github.event.inputs.ReleaseType || 'Release' }}
fi
shell: bash
- name: Upload win-x64 ${{ github.event.inputs.ReleaseType || 'Release' }}
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest' && matrix.architecture == 'x64'
with:
name: win-x64
path: cimgui\build\x64\${{ github.event.inputs.ReleaseType || 'Release' }}\*
- name: Upload win-x86 ${{ github.event.inputs.ReleaseType || 'Release' }}
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest' && matrix.architecture == 'x86'
with:
name: win-x86
path: cimgui\build\x86\${{ github.event.inputs.ReleaseType || 'Release' }}\*
- name: Upload win-${{ lower(matrix.architecture) }} ${{ github.event.inputs.ReleaseType || 'Release' }}

Check failure on line 94 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 94, Col: 15): Unrecognized function: 'lower'. Located at position 1 within expression: lower(matrix.architecture)
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest' && matrix.architecture == 'ARM'
with:
name: win-arm
path: cimgui\build\${{ matrix.architecture }}\${{ github.event.inputs.ReleaseType || 'Release' }}\*
- name: Upload win-arm64 ${{ github.event.inputs.ReleaseType || 'Release' }}
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest' && matrix.architecture == 'ARM64'
with:
name: win-arm64
path: cimgui\build\ARM64\${{ github.event.inputs.ReleaseType || 'Release' }}\*
- name: Upload Linux ${{ github.event.inputs.ReleaseType || 'Release' }}
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
name: linux-x64
path: cimgui/build/${{ github.event.inputs.ReleaseType || 'Release' }}/*
- name: Upload MacOS ${{ github.event.inputs.ReleaseType || 'Release' }}
uses: actions/upload-artifact@v3
if: matrix.os == 'macos-latest'
with:
name: osx-x64
path: cimgui/build/${{ github.event.inputs.ReleaseType || 'Release' }}/*
- name: Upload Definitions Json File
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest' && matrix.architecture == 'x64'
with:
name: JsonFiles
path: cimgui\generator\output\definitions.json
- name: Upload structs_and_enums Json File
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest' && matrix.architecture == 'x64'
with:
name: JsonFiles
path: cimgui\generator\output\structs_and_enums.json
CreateReleaseOnTagCreate:
runs-on: ubuntu-latest
needs: [Build]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
- name: Rename win-x64 and win-x86 artifacts
run: |
mv win-x64/cimgui.dll win-x64/cimgui.win-x64.dll
mv win-x86/cimgui.dll win-x86/cimgui.win-x86.dll
mv win-arm64/cimgui.dll win-arm64/cimgui.win-arm64.dll
mv win-arm/cimgui.dll win-arm/cimgui.win-arm.dll
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
win-x64/cimgui.win-x64.dll
win-x86/cimgui.win-x86.dll
win-arm64/cimgui.win-arm64.dll
win-arm/cimgui.win-arm.dll
JsonFiles/*
linux-x64/cimgui.so
osx-x64/cimgui.dylib