Skip to content

Commit

Permalink
Merge pull request #12 from zaafar/master
Browse files Browse the repository at this point in the history
Updated to 1.89.1 and misc changes
  • Loading branch information
mellinoe authored Dec 20, 2022
2 parents 9acdb4b + aacc18e commit c5b5e6d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 32 deletions.
55 changes: 30 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:

# 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:
Expand All @@ -25,71 +30,71 @@ jobs:
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get Submodules
run: git submodule update --init --recursive

- name: Build
- name: Build ${{ github.event.inputs.ReleaseType || 'Release' }}
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
./ci-build.cmd
./ci-build.cmd ${{ github.event.inputs.ReleaseType || 'Release' }}
else
./ci-build.sh
./ci-build.sh ${{ github.event.inputs.ReleaseType || 'Release' }}
fi
shell: bash

- name: Upload win-x64 Release
uses: actions/upload-artifact@v2
- name: Upload win-x64 ${{ github.event.inputs.ReleaseType || 'Release' }}
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
with:
name: win-x64
path: cimgui\build\x64\Release\cimgui.dll
path: cimgui\build\x64\${{ github.event.inputs.ReleaseType || 'Release' }}\*

- name: Upload win-x86 Release
uses: actions/upload-artifact@v2
- name: Upload win-x86 ${{ github.event.inputs.ReleaseType || 'Release' }}
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
with:
name: win-x86
path: cimgui\build\x86\Release\cimgui.dll
path: cimgui\build\x86\${{ github.event.inputs.ReleaseType || 'Release' }}\*

- name: Upload win-arm Release
uses: actions/upload-artifact@v2
- name: Upload win-arm ${{ github.event.inputs.ReleaseType || 'Release' }}
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
with:
name: win-arm
path: cimgui\build\ARM\Release\cimgui.dll
path: cimgui\build\ARM\${{ github.event.inputs.ReleaseType || 'Release' }}\*

- name: Upload win-arm64 Release
uses: actions/upload-artifact@v2
- name: Upload win-arm64 ${{ github.event.inputs.ReleaseType || 'Release' }}
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
with:
name: win-arm64
path: cimgui\build\ARM64\Release\cimgui.dll
path: cimgui\build\ARM64\${{ github.event.inputs.ReleaseType || 'Release' }}\*

- name: Upload Linux Release
uses: actions/upload-artifact@v2
- 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/Release/cimgui.so
path: cimgui/build/${{ github.event.inputs.ReleaseType || 'Release' }}/*

- name: Upload MacOS Release
uses: actions/upload-artifact@v2
- 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/Release/cimgui.dylib
path: cimgui/build/${{ github.event.inputs.ReleaseType || 'Release' }}/*

- name: Upload Definitions Json File
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
with:
name: JsonFiles
path: cimgui\generator\output\definitions.json

- name: Upload structs_and_enums Json File
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
with:
name: JsonFiles
Expand All @@ -101,7 +106,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3

- name: Rename win-x64 and win-x86 artifacts
run: |
Expand Down
9 changes: 5 additions & 4 deletions ci-build.cmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@setlocal
@echo off
set "RTYPE=%1"

call %~dp0build-native.cmd Release x64
call %~dp0build-native.cmd Release x86
call %~dp0build-native.cmd Release ARM64
call %~dp0build-native.cmd Release ARM
call %~dp0build-native.cmd %RTYPE% x64
call %~dp0build-native.cmd %RTYPE% x86
call %~dp0build-native.cmd %RTYPE% ARM64
call %~dp0build-native.cmd %RTYPE% ARM
5 changes: 3 additions & 2 deletions ci-build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env bash

scriptPath="`dirname \"$0\"`"
RTYPE="${1}"

if [[ "$OSTYPE" == "darwin"* ]]; then
$scriptPath/build-native.sh release -osx-architectures 'arm64;x86_64'
$scriptPath/build-native.sh ${RTYPE} -osx-architectures 'arm64;x86_64'
else
$scriptPath/build-native.sh release
$scriptPath/build-native.sh ${RTYPE}
fi

0 comments on commit c5b5e6d

Please sign in to comment.