|
| 1 | +name: Compile cimgui for all platforms |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +jobs: |
| 7 | + build-linux-x64: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@main |
| 12 | + |
| 13 | + - name: add libs for glfw |
| 14 | + run: sudo apt install xorg-dev |
| 15 | + |
| 16 | + - name: configure glfw |
| 17 | + run: cmake -S . -Bbuild |
| 18 | + working-directory: ./thirdparty/glfw |
| 19 | + |
| 20 | + - name: make glfw |
| 21 | + run: make |
| 22 | + working-directory: ./thirdparty/glfw/build |
| 23 | + |
| 24 | + - name: copy glfw to lib |
| 25 | + run: | |
| 26 | + cp -f ./thirdparty/glfw/build/src/libglfw3.a ./lib/linux/x64 |
| 27 | +
|
| 28 | + - name: configure cimgui |
| 29 | + run: cmake -Bbuild |
| 30 | + working-directory: ./lib |
| 31 | + |
| 32 | + - name: make cimgui |
| 33 | + run: make |
| 34 | + working-directory: ./lib/build |
| 35 | + |
| 36 | + - name: copy cimgui to lib |
| 37 | + run: | |
| 38 | + mkdir -p ./lib/linux/x64 |
| 39 | + cp -f ./lib/build/cimgui.a ./lib/linux/x64/ |
| 40 | +
|
| 41 | + - uses: stefanzweifel/git-auto-commit-action@v4 |
| 42 | + with: |
| 43 | + commit_message: Update linux lib from ci |
| 44 | + |
| 45 | + build-windows-x64: |
| 46 | + needs: build-linux-x64 |
| 47 | + runs-on: windows-latest |
| 48 | + |
| 49 | + defaults: |
| 50 | + run: |
| 51 | + shell: msys2 {0} |
| 52 | + |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@main |
| 55 | + - run: git pull |
| 56 | + - name: Install MinGW |
| 57 | + uses: msys2/setup-msys2@v2 |
| 58 | + with: |
| 59 | + update: true |
| 60 | + install: >- |
| 61 | + make |
| 62 | + pacboy: >- |
| 63 | + toolchain:p |
| 64 | + cmake:p |
| 65 | + ninja:p |
| 66 | +
|
| 67 | + - name: configure glfw |
| 68 | + run: cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release |
| 69 | + working-directory: ./thirdparty/glfw |
| 70 | + |
| 71 | + - name: make glfw |
| 72 | + run: cmake --build build |
| 73 | + working-directory: ./thirdparty/glfw |
| 74 | + |
| 75 | + - name: copy glfw to lib |
| 76 | + run: cp -f ./thirdparty/glfw/build/src/libglfw3.a ./lib/windows/x64 |
| 77 | + |
| 78 | + - name: configure cimgui |
| 79 | + run: cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DIMGUI_STATIC=On |
| 80 | + working-directory: .\lib |
| 81 | + |
| 82 | + - name: make cimgui |
| 83 | + run: cmake --build build |
| 84 | + working-directory: .\lib |
| 85 | + |
| 86 | + - name: copy cimgui to lib |
| 87 | + run: cp -f ./lib/build/cimgui.a ./lib/windows/x64/ |
| 88 | + |
| 89 | + - uses: stefanzweifel/git-auto-commit-action@v4 |
| 90 | + with: |
| 91 | + commit_message: Update windows lib from ci |
| 92 | + |
| 93 | + build-macos: |
| 94 | + needs: build-windows-x64 |
| 95 | + runs-on: macos-latest |
| 96 | + steps: |
| 97 | + - uses: actions/checkout@main |
| 98 | + - uses: git-for-windows/setup-git-for-windows-sdk@v1 |
| 99 | + - run: git pull |
| 100 | + shell: bash |
| 101 | + - name: configure glfw for x64 |
| 102 | + run: cmake -S . -Bbuild -DCMAKE_OSX_ARCHITECTURES=x86_64 |
| 103 | + working-directory: ./thirdparty/glfw |
| 104 | + |
| 105 | + - name: make glfw x84 |
| 106 | + run: make |
| 107 | + working-directory: ./thirdparty/glfw/build |
| 108 | + |
| 109 | + - name: copy glfw to lib |
| 110 | + run: | |
| 111 | + cp -f ./thirdparty/glfw/build/src/libglfw3.a ./lib/macos/x64 |
| 112 | +
|
| 113 | + - name: clean glfw |
| 114 | + run: cmake --build ./build --target clean |
| 115 | + working-directory: ./thirdparty/glfw |
| 116 | + |
| 117 | + - name: configure glfw for arm64 |
| 118 | + run: cmake -S . -Bbuild -DCMAKE_OSX_ARCHITECTURES=arm64 |
| 119 | + working-directory: ./thirdparty/glfw |
| 120 | + |
| 121 | + - name: make glfw arm64 |
| 122 | + run: make |
| 123 | + working-directory: ./thirdparty/glfw/build |
| 124 | + |
| 125 | + - name: copy glfw to lib |
| 126 | + run: | |
| 127 | + cp -f ./thirdparty/glfw/build/src/libglfw3.a ./lib/macos/arm64 |
| 128 | +
|
| 129 | + - name: configure cimgui for x64 |
| 130 | + run: cmake -Bbuild -DCMAKE_OSX_ARCHITECTURES=x86_64 |
| 131 | + working-directory: ./cimgui |
| 132 | + |
| 133 | + - name: make cimgui for x64 |
| 134 | + run: make |
| 135 | + working-directory: ./lib/build |
| 136 | + |
| 137 | + - name: copy cimgui x64 to lib |
| 138 | + run: | |
| 139 | + mkdir -p ./lib/macos/x64 |
| 140 | + cp -f ./lib/build/cimgui.a ./lib/macos/x64/ |
| 141 | +
|
| 142 | + - name: clean up |
| 143 | + run: cmake --build ./build --target clean |
| 144 | + working-directory: ./cimgui |
| 145 | + |
| 146 | + - name: configure cimgui for arm64 |
| 147 | + run: cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DIMGUI_STATIC=On -DCMAKE_OSX_ARCHITECTURES=arm64 |
| 148 | + working-directory: ./cimgui |
| 149 | + |
| 150 | + - name: make cimgui for arm64 |
| 151 | + run: make |
| 152 | + working-directory: ./lib/build |
| 153 | + |
| 154 | + - name: copy cimgui arm64 to lib |
| 155 | + run: | |
| 156 | + mkdir -p ./lib/macos/arm64 |
| 157 | + cp -f ./lib/build/cimgui.a ./lib/macos/arm64/ |
| 158 | +
|
| 159 | + - uses: stefanzweifel/git-auto-commit-action@v4 |
| 160 | + with: |
| 161 | + commit_message: Update macos lib from ci |
0 commit comments