From 852074423ac09b80cedab8487ade60d7e65acfb3 Mon Sep 17 00:00:00 2001 From: Steffen Moeller Date: Wed, 13 Mar 2024 13:49:41 +0100 Subject: [PATCH] build ci: improved compatibility with Windows --- .github/workflows/c-cpp.yml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 54789f82..5044a2c5 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -25,7 +25,6 @@ jobs: run: | choco install mingw wxwidgets sqlite make choco install gnuwin32-m4 - choco install bash - name: Install Dependencies - Linux if: runner.os == 'linux' run: | @@ -37,39 +36,44 @@ jobs: brew install wxwidgets m4 tinyxml zstd autoconf libtool automake brew install libpng sqlite brew install dylibbundler - - name: remove local redundancy to build-deps + - name: remove local redundancy to build-deps - Linux or MacOS if: runner.os == 'linux' || runner.os == 'macOS' run: rm -f mysql* sqlite* && rm -rf clustalw tinyxml - - name: autogen + - name: autogen - Linux or MacOS if: runner.os == 'linux' || runner.os == 'macOS' run: ./autogen.sh - - name: configure + - name: configure - Linux or MacOS if: runner.os == 'linux' || runner.os == 'macOS' run: ./configure - - name: make + - name: make - Windows + if: runner.os == 'windows' + run: | + g++ -o GENtle *.cpp ipc/*.cpp + - name: make - Linux or MacOS + if: runner.os == 'linux' || runner.os == 'macOS' run: | if [ "${{ matrix.os }}" = "macos-latest" ]; then make elif [ "${{ matrix.os }}" = "ubuntu-latest" ]; then make else - g++ -o GENtle *.cpp ipc/*.cpp + echo "Unexpected runer.os: ${{ runner.os }}" + exit fi - name: install asciidoc - if: runner.os == 'windows' || runner.os == 'macOS' + if: runner.os == 'linux' || runner.os == 'macOS' run: | if [ "${{ matrix.os }}" = "macos-latest" ]; then brew install asciidoc elif [ "${{ matrix.os }}" = "ubuntu-latest" ]; then sudo apt install asciidoc fi - - name: build manual.html - run: | - if [ "${{ matrix.os }}" = "macos-latest" ]; then - asciidoc docs/manual.adoc - else - echo "No manual created for ${{ matrix.os }}." > docs/manual.html - fi + - name: build manual.html - Linux or MacOS + if: runner.os == 'windows' + run: echo "No manual created for ${{ matrix.os }}." > docs/manual.html + - name: build manual.html - regular + if: runner.os == 'linux' || runner.os == 'macOS' + run: asciidoc docs/manual.adoc - name: Archive production artifacts uses: actions/upload-artifact@v3 with: