|
| 1 | +name: Build Bin |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' |
| 7 | + |
| 8 | +jobs: |
| 9 | + build_linux: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v3 |
| 14 | + |
| 15 | + - name: Install Qt |
| 16 | + run: sudo apt install qtbase5-dev |
| 17 | + |
| 18 | + - name: Configure CMake |
| 19 | + run: cmake -B build -DWITH_CCACHE=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_QT5=ON |
| 20 | + |
| 21 | + - name: Build |
| 22 | + run: make -C build install -j 4 |
| 23 | + |
| 24 | + - name: Create Archive |
| 25 | + run: bash -c "cd build && ../script_create_bin_dist.sh linux" |
| 26 | + |
| 27 | + - name: Upload binaries to release |
| 28 | + uses: softprops/action-gh-release@v1 |
| 29 | + with: |
| 30 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 31 | + files: build/micmac_linux.tgz |
| 32 | + |
| 33 | + build_win: |
| 34 | + runs-on: windows-latest |
| 35 | + |
| 36 | + steps: |
| 37 | + - uses: actions/checkout@v3 |
| 38 | + |
| 39 | + - name: Install Qt |
| 40 | + uses: jurplel/install-qt-action@v3 |
| 41 | + with: |
| 42 | + cache: true |
| 43 | + |
| 44 | + - name: Configure CMake |
| 45 | + run: cmake -B build -DWITH_CCACHE=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_QT5=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}} |
| 46 | + |
| 47 | + - name: Build |
| 48 | + run: cmake --build build --config Release --target INSTALL -j 4 |
| 49 | + - name: Package |
| 50 | + shell: bash |
| 51 | + run: | |
| 52 | + env |
| 53 | + mkdir -p bin/platforms bin/imageformats |
| 54 | + DEST=$(pwd)/bin |
| 55 | + cd $Qt5_Dir/bin |
| 56 | + cp Qt5Core.dll Qt5Gui.dll Qt5Xml.dll Qt5OpenGL.dll Qt5Widgets.dll $DEST/ |
| 57 | + cd $Qt5_Dir/plugins |
| 58 | + cp platforms/qwindows.dll $DEST/platforms/ |
| 59 | + cp imageformats/*.dll $DEST/imageformats/ |
| 60 | + cd $GITHUB_WORKSPACE |
| 61 | + ls -lrt bin |
| 62 | +
|
| 63 | + - name: Create Zip |
| 64 | + run: 7z a micmac_windows.zip bin\ binaire-aux\ include\XML_MicMac\ include\XML_GEN\ include\qt |
| 65 | + |
| 66 | + - name: Upload binaries to release |
| 67 | + uses: softprops/action-gh-release@v1 |
| 68 | + with: |
| 69 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 70 | + files: micmac_windows.zip |
| 71 | + |
0 commit comments