Skip to content

Commit

Permalink
build ci: improved compatibility with Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
smoe committed Mar 13, 2024
1 parent 3360d36 commit 8520744
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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:
Expand Down

0 comments on commit 8520744

Please sign in to comment.