Skip to content

Add the appropriate steps to MAC ARM #16

Add the appropriate steps to MAC ARM

Add the appropriate steps to MAC ARM #16

Workflow file for this run

name: CMake Build for Doxygen
on: [push, pull_request]
jobs:
build:
permissions:
contents: write # to push pages branch (peaceiris/actions-gh-pages)
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "macOS Latest Release (Intel)",
os: macos-13,
build_type: "Release", cc: "clang", cxx: "clang++",
build_gen: "Unix Makefiles"
}
- {
name: "macOS Latest Release (Apple Silicon)",
os: macos-latest,
build_type: "Release", cc: "clang", cxx: "clang++",
build_gen: "Unix Makefiles"
}
- {
name: "Windows Latest MSVC Release",
os: windows-latest,
build_type: "Release", cc: "cl", cxx: "cl",
build_gen: "NMake Makefiles"
}
steps:
- name: Checkout doxygen
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check MAC CPU Architecture
shell: bash
run: |
uname -m
if: matrix.config.os != 'windows-latest'
- name: Install libiconv (Windows)
uses: suisei-cn/actions-download-file@v1
with:
url: "https://github.com/pffang/libiconv-for-Windows/releases/download/v1.16/libiconv-for-Windows_1.16.7z"
target: .
if: matrix.config.os == 'windows-latest'
- name: Install LaTeX (MacOS)
run: |
brew update
brew install --cask mactex;
echo "/Library/TeX/texbin/" >> $GITHUB_PATH
if: matrix.config.os != 'windows-latest'
- name: Install LaTeX (Windows)
uses: teatimeguest/setup-texlive-action@v3
with:
packages: >-
scheme-medium
collection-latexextra
babel-dutch
cjk
bibtex
if: matrix.config.os == 'windows-latest'
- name: Install Ghostscript (Windows)
run:
choco install ghostscript
if: matrix.config.os == 'windows-latest'
- name: Setting Ghostscript paths (Windows)
shell: bash
run: |
export GSpath=`find /c/Prog*/gs -name gswin\*c.exe | sed -e "s/gswin.*c.exe//"`
export PATH="$GSpath:$PATH"
export GSpath=`echo "$GSpath" | sed -e "s%/c%C:%"`
echo "$GSpath" >> $GITHUB_PATH
if: matrix.config.os == 'windows-latest'
- name: Install xmllint (MacOS)
run: |
brew install --force --overwrite [email protected] # temp hack
brew install --force --overwrite [email protected] # temp hack
brew update
brew install libxml2
if: matrix.config.os != 'windows-latest'
- name: Install bison (MacOS)
run: |
brew update
brew install bison;
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
#echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
if: matrix.config.os != 'windows-latest'
- name: Install bison/flex (Windows)
run: |
#Choco-Install -PackageName winflexbison
choco install winflexbison
if: matrix.config.os == 'windows-latest'
- name: Install Graphviz (MacOS)
run: |
if ! brew install graphviz; then
# Workaround issue with unexpected symlinks: https://github.com/actions/runner-images/issues/6817
for f in 2to3 idle3 pydoc3 python3 python3-config; do
rm /usr/local/bin/$f || true
done
# Try again
brew install graphviz
fi
if: matrix.config.os != 'windows-latest'
- name: Install Graphviz (Windows)
run:
choco install graphviz.portable
if: matrix.config.os == 'windows-latest'
- name: Setup VS Environment (Windows)
uses: seanmiddleditch/gha-setup-vsdevenv@master
if: matrix.config.os == 'windows-latest'
- name: Refresh Env (Windows)
run: |
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
refreshenv
if: matrix.config.os == 'windows-latest'
- name: Check tool versions (Linux / MacOS)
shell: bash
run: |
echo "=== perl ===";
perl --version;
echo "=== python ===";
python --version;
echo "=== cmake ===";
cmake --version;
echo "=== latex ===";
latex --version;
echo "=== bibtex ===";
bibtex --version
echo "=== dvips ===";
dvips --version
echo "=== bison ===";
bison --version;
echo "=== flex ===";
flex --version;
echo "=== dot ===";
dot -V;
echo "=== ghostscript ===";
gs --version;
if: matrix.config.os != 'windows-latest'
- name: Check tool versions (Windows)
shell: bash
run: |
echo "=== perl ===";
perl --version;
echo "=== python ===";
python --version;
echo "=== cmake ===";
cmake --version;
echo "=== latex ===";
latex --version;
echo "=== bibtex ===";
bibtex --version
echo "=== dvips ===";
dvips --version
echo "=== bison ===";
win_bison --version;
echo "=== flex ===";
win_flex --version;
echo "=== dot ===";
dot -V;
echo "=== ghostscript ===";
gswin64c --version;
if: matrix.config.os == 'windows-latest'
- name: Configure
shell: cmake -P {0}
run: |
set(ENV{CC} ${{ matrix.config.cc }})
set(ENV{CXX} ${{ matrix.config.cxx }})
execute_process(
COMMAND cmake
-S .
-B build
-D CMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
-G "${{ matrix.config.build_gen }}"
-Dbuild_doc=YES
${{ matrix.config.cmake_extra_opts }}
RESULT_VARIABLE result
)
if (NOT result EQUAL 0)
message(FATAL_ERROR "Bad exit status")
endif()
- name: Build
shell: cmake -P {0}
run: |
include(ProcessorCount)
ProcessorCount(N)
execute_process(
COMMAND cmake --build build --parallel ${N}
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_VARIABLE output
ECHO_OUTPUT_VARIABLE ECHO_ERROR_VARIABLE
)
if (NOT result EQUAL 0)
string(REGEX MATCH "FAILED:.*$" error_message "${output}")
string(REPLACE "\n" "%0A" error_message "${error_message}")
message("::error::${error_message}")
message(FATAL_ERROR "Build failed")
endif()
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: "${{ matrix.config.name }} build artifacts"
path: build/bin/