Skip to content

Commit

Permalink
Create CI using GitHub Actions and added a readme file on how to upgr…
Browse files Browse the repository at this point in the history
…ade ImGui.
  • Loading branch information
zaafar committed Nov 16, 2021
1 parent 4d3105c commit 9374745
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 1 deletion.
104 changes: 104 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
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:

jobs:
Build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

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

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

- name: Build
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
./ci-build.cmd
else
./ci-build.sh
fi
shell: bash

- name: Upload x64 Release
uses: actions/upload-artifact@v2
if: matrix.os == 'windows-latest'
with:
name: win-x64
path: cimgui\build\x64\Release\cimgui.dll

- name: Upload x86 Release
uses: actions/upload-artifact@v2
if: matrix.os == 'windows-latest'
with:
name: win-x86
path: cimgui\build\x86\Release\cimgui.dll

- name: Upload Linux Release
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-latest'
with:
name: linux-x64
path: cimgui/build/Release/cimgui.so

- name: Upload MacOS Release
uses: actions/upload-artifact@v2
if: matrix.os == 'macos-latest'
with:
name: osx-x64
path: cimgui/build/Release/cimgui.dylib

- name: Upload Definitions Json File
uses: actions/upload-artifact@v2
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
if: matrix.os == 'windows-latest'
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@v2

- 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
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
win-x64/*
win-x86/*
JsonFiles/*
linux-x64/*
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "cimgui"]
path = cimgui
url = https://github.com/extrawurst/cimgui
branch = docking_inter
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# To Update to the latest cimgui version

git submodule update --init

git submodule update --remote

and then git commit + push.


# To Trigger a release push a tag as shown below

git tag -a v1.4 -m "my version 1.4"

git push origin v1.4
2 changes: 1 addition & 1 deletion cimgui

0 comments on commit 9374745

Please sign in to comment.