-
Notifications
You must be signed in to change notification settings - Fork 2
96 lines (86 loc) · 2.64 KB
/
linux.yml
File metadata and controls
96 lines (86 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Build (Linux)
on:
workflow_call:
inputs:
imgui_commit:
description: 'SHA-1 hash to checkout'
default: ''
required: false
type: string
imgui_branch:
description: 'ImGui branch to checkout. If you change this value from default, please set `fetch_depth` to 0.'
default: 'master'
required: false
type: string
fetch_depth:
description: 'Number of commits to fetch. 0 indicates all history for all branches and tags.'
default: '1'
required: false
type: string
workflow_dispatch:
inputs:
imgui_commit:
description: 'SHA-1 hash to checkout'
default: ''
required: false
imgui_branch:
description: 'ImGui branch to checkout. If you change this value from default, please set `fetch_depth` to 0.'
default: 'master'
required: false
fetch_depth:
description: 'Number of commits to fetch. 0 indicates all history for all branches and tags.'
default: '1'
required: false
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{github.ref}}
fetch-depth: ${{ github.event.inputs.fetch_depth }}
submodules: recursive
# - name: Setup OpenGL
# run: sudo apt -y install libopengl-dev libxrandr-dev mesa-common-dev libxinerama-dev libxcursor-dev libxi-dev
- name: Checkout specific ImGui commit
if: "${{ github.event.inputs.imgui_commit != ''}}"
run: |
cd imgui_dll/cimgui/imgui
git fetch --all
git switch ${{ github.event.inputs.imgui_branch }}
git checkout -f --detach ${{ github.event.inputs.imgui_commit }}
cd ../../..
- name: Install luajit
continue-on-error: true
run: |
sudo apt install luajit
luajit -v
- name: Generate cimgui code
run: |
cd imgui_dll/cimgui/generator
luajit generator.lua gcc ""
cd ../../..
- name: Build imgui so
run: |
cd imgui_dll
bash ./build_imgui_linux.sh
cd ..
- name: Build imnodes so
run: |
cd imnodes_dll
bash ./build_imnodes_linux.sh
cd ..
- name: Commit new libraries
continue-on-error: true
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}"
git add lib/*
git commit -a -m "commit by ${GITHUB_ACTOR} via GitHub Actions"
git push --force-with-lease -u origin ${{github.ref}}