Skip to content

Commit

Permalink
Merge pull request #183 from IntegerLimit/windows-mac
Browse files Browse the repository at this point in the history
Expand CI System to Build for Mac x86-64 and Windows x86-64
  • Loading branch information
bqminh authored May 6, 2024
2 parents d8887b0 + 9fab507 commit c665a53
Showing 1 changed file with 99 additions and 22 deletions.
121 changes: 99 additions & 22 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
name: Linux x86_64
name: Build

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

# If a Second Commit is Pushed After, and Build is Not Complete, Cancel
# Extremely Important with the High Computation Time and Power Required of Arm Linux Builds
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Linux x86_64
build-linux-x86-64:
name: Linux x86-64
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -35,7 +41,7 @@ jobs:
make -j
file iqtree2 | grep x86-64
build-aarch64:
build-linux-aarch64:
name: Linux aarch64
runs-on: ubuntu-latest

Expand Down Expand Up @@ -64,27 +70,98 @@ jobs:
make -j
file iqtree2 | grep aarch64
build-macos-m:
build-macos-x86_64:
name: Mac OS x86-64
runs-on: macos-13 # Mac OS 14 Does Not Support x86-64

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Install dependencies
run: brew install make eigen boost libomp

- name: Build
run: |
set -x
mkdir build
cd build
export LDFLAGS="-L/usr/local/opt/libomp/lib"
export CPPFLAGS="-I/usr/local/opt/libomp/include"
export CXXFLAGS="-I/usr/local/opt/libomp/include"
cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
gmake -j
file iqtree2 | grep x86_64
build-macos-arm:
name: Mac OS ARM64
runs-on: macos-14

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Install dependencies
run: brew install make eigen boost libomp

- name: Install dependencies
run: brew install make eigen boost libomp
- name: Build
run: |
set -x
mkdir build
cd build
export LDFLAGS="-L/opt/homebrew/opt/libomp/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libomp/include"
export CXXFLAGS="-I/opt/homebrew/opt/libomp/include"
cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
gmake -j
file iqtree2 | grep arm64
build-windows-x86-64:
name: Windows x86-64
runs-on: windows-2022

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Install LLVM v14
shell: cmd
run: choco install llvm --version=14.0.6 --allow-downgrade

- name: Install Boost
uses: MarkusJx/install-boost@v2.4.5
id: install-boost
with:
boost_version: 1.84.0
platform_version: 2022
toolset: mingw

- name: Install Eigen3
shell: cmd
run: choco install eigen

- name: Compile
shell: cmd
run: |
if exist build rd /s /q build
mkdir build
cd build
-DBoost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include\
-DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib
cmake -G "MinGW Makefiles" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS=--target=x86_64-pc-windows-gnu -DCMAKE_CXX_FLAGS=--target=x86_64-pc-windows-gnu -DCMAKE_MAKE_PROGRAM=mingw32-make ..
make -j
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}

- name: Check File Arch
shell: bash
run: |
cd build
file iqtree2.exe | grep x86-64
- name: Build
run: |
set -x
mkdir build
cd build
export LDFLAGS="-L/opt/homebrew/opt/libomp/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libomp/include"
export CXXFLAGS="-I/opt/homebrew/opt/libomp/include"
cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
gmake -j
file iqtree2 | grep arm64

0 comments on commit c665a53

Please sign in to comment.