Merge pull request #237 from emiliofernandes/patch-1 #161
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile AutoDock-Vina binaries | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
paths-ignore: | |
- 'example/**' | |
- 'docs/**' | |
- 'data/**' | |
pull_request: | |
branches: | |
- master | |
- develop | |
paths-ignore: | |
- 'example/**' | |
- 'docs/**' | |
- 'data/**' | |
release: | |
types: | |
- published | |
jobs: | |
compile_binaries: | |
name: Build wheels on ${{ matrix.os }} ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: x86_64 | |
- os: ubuntu-latest | |
arch: aarch64 | |
- os: macos-latest | |
arch: x86_64 | |
- os: macos-latest | |
arch: aarch64 | |
- os: windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Compile Vina for Linux x86-64 | |
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64' | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y libboost-all-dev swig | |
cd ./build/linux/release | |
make | |
- name: Compile Vina for Linux aarch64 | |
if: matrix.os == 'ubuntu-latest' && matrix.arch != 'x86_64' | |
uses: uraimo/run-on-arch-action@v2 | |
with: | |
arch: ${{ matrix.arch }} | |
distro: ubuntu20.04 | |
githubToken: ${{ github.token }} | |
dockerRunArgs: | | |
--volume "${PWD}:/vina" | |
install: | | |
apt-get update -q -y | |
apt-get install -q -y git build-essential make libboost-all-dev swig | |
run: | | |
cd /vina/build/linux/release | |
make | |
- name: Compile Vina for macOS x86_64 | |
if: matrix.os == 'macos-latest' && matrix.arch == 'x86_64' | |
run: | | |
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
eval "$(/usr/local/bin/brew shellenv)" | |
arch -x86_64 brew install boost swig | |
cd ./build/mac/release | |
arch -x86_64 make | |
- name: Compile Vina for macOS aarch64 | |
if: matrix.os == 'macos-latest' && matrix.arch == 'aarch64' | |
run: | | |
brew install boost swig | |
cd ./build/mac/release | |
make | |
- name: Compile Vina for Windows x64 | |
if: matrix.os == 'windows-2019' | |
run: | | |
$Url = "https://sourceforge.net/projects/boost/files/boost-binaries/1.77.0/boost_1_77_0-msvc-14.2-64.exe" | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
$wcl=(New-Object System.Net.WebClient) | |
$wcl.Headers.Add("user-agent", "Wget/1.21.0") | |
$wcl.DownloadFile($Url, "$env:TEMP\boost.exe") | |
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES" | |
cd .\build\windows | |
.\compile.bat | |
shell: powershell | |
- name: Upload artifacts for inspection | |
uses: actions/upload-artifact@v4 | |
with: | |
name: binaries-${{ matrix.os }}${{ matrix.arch }} | |
path: | | |
./**/release/vina* |