Skip to content

Commit

Permalink
GitHub: build/publish linux/windows mmv1 binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
meynardc committed Mar 30, 2023
1 parent f4800e8 commit 2d0e290
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 46 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/cmake.yml

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/release_bin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build Bin

on:
push:
tags:
- 'v*'

jobs:
build_linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install Qt
run: sudo apt install qtbase5-dev

- name: Configure CMake
run: cmake -B build -DWITH_CCACHE=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_QT5=ON

- name: Build
run: make -C build install -j 4

- name: Create Archive
run: bash -c "cd build && ../script_create_bin_dist.sh linux"

- name: Upload binaries to release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: build/micmac_linux.tgz

build_win:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
cache: true

- name: Configure CMake
run: cmake -B build -DWITH_CCACHE=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_QT5=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}

- name: Build
run: cmake --build build --config Release --target INSTALL -j 4
- name: Package
shell: bash
run: |
env
mkdir -p bin/platforms bin/imageformats
DEST=$(pwd)/bin
cd $Qt5_Dir/bin
cp Qt5Core.dll Qt5Gui.dll Qt5Xml.dll Qt5OpenGL.dll Qt5Widgets.dll $DEST/
cd $Qt5_Dir/plugins
cp platforms/qwindows.dll $DEST/platforms/
cp imageformats/*.dll $DEST/imageformats/
cd $GITHUB_WORKSPACE
ls -lrt bin
- name: Create Zip
run: 7z a micmac_windows.zip bin\ binaire-aux\ include\XML_MicMac\ include\XML_GEN\ include\qt

- name: Upload binaries to release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: micmac_windows.zip

6 changes: 4 additions & 2 deletions README-GitHub-release.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
To publish a release on GitHub with a compiled version of MicMac (v1, linux),
To publish a release on GitHub with a compiled version of MicMac (v1, linux/Windows),
use one the two following methods:
- Create a git tag starting with 'v' and then push it on GitHub
( git tag v2.01 ; git push origin --tag )
- Use GitHub Release creation feature with a new tag starting with 'v'

The release Assets will contain, in addition to the source code,
a linux compiled version of micmac v1 : micmac_linux.tgz.
two compiled versions of micmac v1 :
- micmac_linux.tgz.
- micmac_windows.zip

0 comments on commit 2d0e290

Please sign in to comment.