Skip to content

Commit

Permalink
Merge pull request #5 from zaafar/master
Browse files Browse the repository at this point in the history
Creating GitHub Actions pipeline
  • Loading branch information
mellinoe authored Jan 1, 2022
2 parents d52e07b + 43b2194 commit 4d1764c
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 45 deletions.
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
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

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
27 changes: 0 additions & 27 deletions appveyor.yml

This file was deleted.

2 changes: 0 additions & 2 deletions ci-build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
@echo off

call %~dp0build-native.cmd Release x64
copy %~dp0cimgui\build\x64\Release\cimgui.dll %~dp0cimgui\build\x64\Release\cimgui.win-x64.dll
call %~dp0build-native.cmd Release x86
copy %~dp0cimgui\build\x86\Release\cimgui.dll %~dp0cimgui\build\x86\Release\cimgui.win-x86.dll
2 changes: 1 addition & 1 deletion cimgui

0 comments on commit 4d1764c

Please sign in to comment.