Add visual studio CI tests #146
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: CI | |
on: | |
schedule: | |
- cron: "0 2 * * 0" | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
visual-studio: | |
timeout-minutes: 180 | |
runs-on: windows-latest | |
name: Visual Studio | |
steps: | |
# - uses: lukka/get-cmake@latest | |
- name: Install vcpkg deps | |
uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgGitCommitId: "8eb57355a4ffb410a2e94c07b4dca2dffbee8e50" # "2023.10.19" | |
runVcpkgInstall: true | |
- uses: actions/checkout@v3 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
# - name: Install vcpkg dependencies | |
# run: | | |
# vcpkg install --triplet x64-windows gtkmm plplot pkgconf | |
- name: Build with meson | |
run: | | |
# set PKG_CONFIG_PATH to allow pkgconf to find the pkg-config files | |
$Env:PKG_CONFIG_PATH = "C:\vcpkg\installed\x64-windows\lib\pkgconfig" | |
meson setup meson-build --buildtype=release | |
meson compile -C meson-build | |
env: | |
PKG_CONFIG: C:\vcpkg\installed\x64-windows\tools\pkgconf\pkgconf.exe | |
macos: | |
timeout-minutes: 60 | |
runs-on: macos-latest | |
steps: | |
- name: Install homebrew dependencies | |
run: | | |
set -ex | |
rm -f /usr/local/bin/2to3 | |
rm -r "$(brew --cache)/api" | |
brew update | |
brew install wget pkg-config doxygen graphviz git meson ninja gtkmm4 plplot | |
set +ex | |
- uses: actions/checkout@v4 | |
- name: Build and test | |
run: | | |
set -ex | |
meson setup --buildtype=debugoptimized -Dbuild-documentation=enabled builddir && cd builddir | |
meson compile | |
meson dist | |
set +ex | |
env: | |
CC: clang | |
CXX: clang++ | |
msys2: | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
cc: | |
- clang | |
- gcc | |
include: | |
- cc: clang | |
cxx: clang++ | |
- cc: gcc | |
cxx: g++ | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: > | |
base-devel | |
git | |
mingw-w64-x86_64-gcc | |
mingw-w64-x86_64-gtkmm4 | |
mingw-w64-x86_64-meson | |
mingw-w64-x86_64-clang | |
mingw-w64-x86_64-lld | |
mingw-w64-x86_64-pkg-config | |
mingw-w64-x86_64-cmake | |
mingw-w64-x86_64-doxygen | |
mingw-w64-x86_64-graphviz | |
make | |
wget | |
- uses: actions/checkout@v4 | |
- name: Install PLplot | |
run: | | |
set -ex | |
wget -q https://downloads.sourceforge.net/project/plplot/plplot/5.15.0%20Source/plplot-5.15.0.tar.gz | |
tar xfz plplot-${PLPLOT_VERSION}.tar.gz | |
cd plplot-${PLPLOT_VERSION} | |
cmake -G "MSYS Makefiles" \ | |
-DENABLE_DYNDRIVERS=OFF \ | |
-DPLD_wingcc=OFF \ | |
-DENABLE_cxx=ON \ | |
-DENABLE_qt=OFF \ | |
-DENABLE_fortran=OFF \ | |
-DENABLE_tcl=OFF \ | |
-DENABLE_tk=OFF \ | |
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ | |
. | |
make | |
make install | |
set +ex | |
env: | |
PLPLOT_VERSION: 5.15.0 | |
- name: Build | |
run: | | |
set -ex | |
meson setup --buildtype=debugoptimized -Dbuild-documentation=enabled builddir && cd builddir | |
meson compile | |
meson dist --allow-dirty | |
set +ex | |
env: | |
CC: ${{matrix.cc}} | |
CXX: ${{matrix.cxx}} | |
linux: | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
image: | |
- ubuntu:rolling | |
- debian:bookworm | |
- fedora:latest | |
cc: | |
- clang | |
- gcc | |
include: | |
- cc: clang | |
cxx: clang++ | |
- cc: gcc | |
cxx: g++ | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ matrix.image }} | |
steps: | |
- name: Install ubuntu dependencies | |
if: startsWith(matrix.image, 'ubuntu') || startsWith(matrix.image, 'debian') | |
run: | | |
set -ex | |
apt-get --yes --force-yes update | |
apt-get --yes --force-yes install gcc clang pkg-config git curl libplplot-dev libgtkmm-4.0-dev doxygen graphviz meson ninja-build | |
set +ex | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
- name: Install RHEL dependencies | |
if: startsWith(matrix.image, 'rockylinux') || startsWith(matrix.image, 'fedora') | |
run: | | |
set -ex | |
yum clean all -y | |
yum install -y make gcc-gfortran gcc clang gcc-c++ pkgconfig git gtkmm4.0-devel plplot-devel doxygen graphviz meson ninja-build | |
set +ex | |
# checkout needs to happen later, as git needs to be installed to ensure a clone happens | |
- uses: actions/checkout@v4 | |
# Add checkout directory as safe.directory and avoid git list issue | |
- name: Set permissions | |
run: | | |
set -ex | |
git config --global --add safe.directory /__w/gtkmm-plplot/gtkmm-plplot | |
set +ex | |
- name: Build and test with meson | |
run: | | |
set -ex | |
export PATH=${HOME}/.local/bin:${PATH} | |
meson setup --buildtype=debugoptimized -Dbuild-documentation=enabled builddir && cd builddir | |
meson compile | |
meson dist | |
set +ex | |
env: | |
CC: ${{matrix.cc}} | |
CXX: ${{matrix.cxx}} |