Skip to content

Merge pull request #68 from iqtree/huaiyan #133

Merge pull request #68 from iqtree/huaiyan

Merge pull request #68 from iqtree/huaiyan #133

Workflow file for this run

name: Build
on:
push:
branches: ["unit_test_update", "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-linux-x86-64:
name: Linux x86-64 gcc-${{ matrix.gcc-version }} cmake-${{ matrix.cmake-version }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
# Oldest supported gcc and cmake versions
- gcc-version: 9
cmake-version: 3.14.7
upload: true
runtime-arg: 4
# Latest supported gcc and cmake versions
- gcc-version: 12
cmake-version: latest
upload: false
runtime-arg: 5
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install dependencies
run: |
sudo apt-get update -q -y
sudo apt-get install -q -y gcc-${{ matrix.gcc-version }} g++-${{ matrix.gcc-version}} libeigen3-dev libboost-dev
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: ${{ matrix.cmake-version }}
- name: Build
run: |
mkdir build
cd build
cmake .. -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DIQTREE_FLAGS=static -DCMAKE_C_COMPILER=$(which gcc-${{ matrix.gcc-version }}) -DCMAKE_CXX_COMPILER=$(which g++-${{ matrix.gcc-version }})
make -j
make package
file iqtree3 | grep x86-64
file iqtree*.tar.gz | grep gzip
- name: Upload Built Binary
# Only upload for one of the gcc & cmake tests
if: ${{ matrix.upload }}
uses: actions/upload-artifact@v4
with:
name: Linux x86-64
path: build/iqtree*.tar.gz
if-no-files-found: error
- name: Run test_iqtree.sh
run: |
chmod +x test_scripts/test_iqtree.sh
./test_scripts/test_iqtree.sh
- name: Run verify_results.sh
run: |
chmod +x test_scripts/verify_results.sh
./test_scripts/verify_results.sh
- name: Run verify_runtimes.sh
run: |
chmod +x test_scripts/verify_runtime.sh
./test_scripts/verify_runtime.sh "${{ matrix.runtime-arg }}"
build-linux-aarch64:
name: Linux aarch64
runs-on: ubuntu-22.04-arm
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install dependencies
run: |
sudo apt-get update -q -y
sudo apt-get install -q -y gcc g++ libeigen3-dev libboost-dev
- name: Build
run: |
mkdir build
cd build
cmake .. -DIQTREE_FLAGS=static
make -j
make package
file iqtree3 | grep aarch64
- name: Upload Built Binary
uses: actions/upload-artifact@v4
with:
name: Linux AArch64
path: build/iqtree*.tar.gz
if-no-files-found: error
- name: Run test_iqtree.sh
run: |
chmod +x test_scripts/test_iqtree.sh
./test_scripts/test_iqtree.sh
- name: Run verify_results.sh
run: |
chmod +x test_scripts/verify_results.sh
./test_scripts/verify_results.sh
- name: Run verify_runtimes.sh
run: |
chmod +x test_scripts/verify_runtime.sh
./test_scripts/verify_runtime.sh 6
compile-linux-universal:
name: Linux Universal
runs-on: ubuntu-latest
needs:
- build-linux-x86-64
- build-linux-aarch64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Linux x86-64 Artifact
uses: actions/download-artifact@v4
with:
name: Linux x86-64
path: x86
- name: Download Linux Arm Artifact
uses: actions/download-artifact@v4
with:
name: Linux AArch64
path: arm
- name: Combine Artifacts
run: |
chmod +x test_scripts/make_linux_universal.sh
file1=$(ls x86/iqtree*.tar.gz)
file2=$(ls arm/iqtree*.tar.gz)
test_scripts/make_linux_universal.sh "$file1" "$file2"
- name: Upload Built Binary
uses: actions/upload-artifact@v4
with:
name: Linux Universal
path: iqtree*.tar.gz
if-no-files-found: error
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 CPPFLAGS="-I/usr/local/opt/libomp/include"
export CXXFLAGS="-I/usr/local/opt/libomp/include"
cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
make -j
make package
file iqtree3 | grep x86_64
file iqtree*.zip | grep Zip
- name: Upload Built Binary
uses: actions/upload-artifact@v4
with:
name: Mac x86-64
path: build/iqtree*.zip
if-no-files-found: error
- name: Run test_iqtree.sh
run: |
chmod +x test_scripts/test_iqtree.sh
./test_scripts/test_iqtree.sh
- name: Run verify_results.sh
run: |
chmod +x test_scripts/verify_results.sh
./test_scripts/verify_results.sh
- name: Run verify_runtimes.sh
run: |
chmod +x test_scripts/verify_runtime.sh
./test_scripts/verify_runtime.sh 7
build-macos-arm:
name: Mac OS ARM64
runs-on: macos-14
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 CPPFLAGS="-I/opt/homebrew/opt/libomp/include"
export CXXFLAGS="-I/opt/homebrew/opt/libomp/include"
cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
make -j
make package
file iqtree3 | grep arm64
file iqtree*.zip | grep Zip
- name: Upload Built Binary
uses: actions/upload-artifact@v4
with:
name: Mac Arm
path: build/iqtree*.zip
if-no-files-found: error
- name: Run test_iqtree.sh
run: |
chmod +x test_scripts/test_iqtree.sh
./test_scripts/test_iqtree.sh
- name: Run verify_results.sh
run: |
chmod +x test_scripts/verify_results.sh
./test_scripts/verify_results.sh
- name: Run verify_runtimes.sh
run: |
chmod +x test_scripts/verify_runtime.sh
./test_scripts/verify_runtime.sh 8
compile-mac-universal:
name: Mac OS Universal
runs-on: macos-14
needs:
- build-macos-x86_64
- build-macos-arm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Mac x86-64 Artifact
uses: actions/download-artifact@v4
with:
name: Mac x86-64
path: x86
- name: Download Mac Arm Artifact
uses: actions/download-artifact@v4
with:
name: Mac Arm
path: arm
- name: Combine Artifacts
run: |
chmod +x test_scripts/make_universal.sh
file1=$(ls x86/iqtree*.zip)
file2=$(ls arm/iqtree*.zip)
test_scripts/make_universal.sh "$file1" "$file2"
- name: Upload Built Binary
uses: actions/upload-artifact@v4
with:
name: Mac Universal
path: iqtree*.zip
if-no-files-found: error
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
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 ^
-DBoost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include ^
-DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib ^
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 ^
-DIQTREE_FLAGS="static cpp14" ..
make -j
make package
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
- name: Check File Arch
shell: bash
run: |
cd build
file iqtree3.exe | grep x86-64
file iqtree*.zip
- name: Upload Built Binary
uses: actions/upload-artifact@v4
with:
name: Windows x86-64
path: build/iqtree*.zip
if-no-files-found: error
- name: Run test_iqtree.ps1
shell: pwsh
run: |
./test_scripts/test_iqtree.ps1
- name: Run verify_results.ps1
shell: pwsh
run: |
./test_scripts/verify_results.ps1
- name: Run verify_runtimes.ps1
shell: pwsh
run: |
./test_scripts/verify_runtime.ps1