From f4800e8928543fb5c6bcbb800e6b30c901ac494b Mon Sep 17 00:00:00 2001 From: Christophe Meynard Date: Wed, 29 Mar 2023 13:43:13 +0200 Subject: [PATCH] GitHub: build and publish mmv1 on Github --- .github/workflows/cmake.yml | 38 ++++++++++++++++++++----------------- README-GitHub-release.txt | 8 ++++++++ README.md | 1 - 3 files changed, 29 insertions(+), 18 deletions(-) create mode 100644 README-GitHub-release.txt diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f5c387d96e..a8e01460f0 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -2,9 +2,8 @@ name: CMake on: push: - branches: [ master ] - pull_request: - branches: [ master ] + tags: + - 'v*' env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -14,27 +13,32 @@ jobs: multi_os: strategy: matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] + # os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Install Qt - uses: jurplel/install-qt-action@v2.14.0 + run: sudo apt install qtbase5-dev + - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + run: cmake -B build -DWITH_CCACHE=OFF -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_QT5=ON + + #- name: Build + #run: cmake --build build --config ${{env.BUILD_TYPE}} -j 4 - name: Build - # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - -# - name: Test -# working-directory: ${{github.workspace}}/build -# # Execute tests defined by the CMake configuration. -# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail -# run: ctest -C ${{env.BUILD_TYPE}} - + run: make -C build install -j 4 + + - name: Package + 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 + diff --git a/README-GitHub-release.txt b/README-GitHub-release.txt new file mode 100644 index 0000000000..6dbf38e1a2 --- /dev/null +++ b/README-GitHub-release.txt @@ -0,0 +1,8 @@ + To publish a release on GitHub with a compiled version of MicMac (v1, linux), +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. diff --git a/README.md b/README.md index afd1ca876c..570bd69558 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ MICMAC ====== -[![Build Status](https://travis-ci.org/micmacIGN/micmac.svg?branch=master)](https://travis-ci.org/micmacIGN/micmac) [Version française](LISEZMOI.md)