AppVeyor for Linux, MacOS and Windows CI
AppVeyor Linux-based CI and MacOS CI works well, like the free Windows-based CI AppVeyor is well known for. GitHub Actions CI is an even more popular choice.
Minimal Examples
Minimal working examples of .appveyor.yml for both Windows and Linux using Python, C++ and/or Fortran are given below.
Use per-line distinct commands for each OS where needed.
The other way is to use matrix:
, but unique per-line OS commands are more intuitive for many use cases.
- For Linux, the
stack:
stanza picks software/version for a set of common programs–here, Python 3. - Note the use of
cmd:
for Windows-exclusive commands, andsh:
for Linux-exclusive commands.
Python
Note: f2py on AppVeyor Windows has its own page–importing Fortran libraries from Python.
This appveyor.yml
runs Python 3 on the latest MacOS, Windows 10 and Ubuntu:
image:
- macos
- Visual Studio 2019
- Ubuntu
stack: python 3
environment:
PY_DIR: C:\Python37-x64
clone_depth: 25
build: off
init:
- cmd: set PATH=%PY_DIR%;%PY_DIR%\Scripts;%PATH%
install:
- python --version
- python -m pip install -e .[tests,full]
test_script: pytest
Fortran
image:
- macos
- Visual Studio 2019
- ubuntu
environment:
MSYS_DIR: "c:/msys64/mingw64/bin"
clone_depth: 25
build: off
init:
- cmd: set PATH=%MSYS_DIR%;%PATH%
install:
- cmd: cmake -G Ninja -B build
- sh: cmake -B build
- cmake --install build
test_script:
- cd build
- ctest -V
Manual Linux install
Install additional Linux programs in AppVeyor via commands like:
init:
- sh: sudo apt -yq update > /dev/null
- sh: sudo apt install -yq --no-install-suggests --no-install-recommends bwbasic > /dev/null
Notes
image:
selects between environments such as:- Windows Server 2016 (Windows 10-like)
- Ubuntu Linux.
Command “python setup.py egg_info” failed with error code 1
Try using Miniconda3 C:\Miniconda3-x64
Related
f2py on AppVeyor Windows