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