forked from libsemigroups/libsemigroups_pybind11
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (69 loc) · 2.22 KB
/
custom-branch.yml
File metadata and controls
74 lines (69 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Run tests on custom libsemigroups branch
on:
workflow_dispatch:
inputs:
branch:
description: "The branch of libsemigroups to clone"
required: true
type: string
fork:
description: "The fork of libsemigroups to clone"
required: false
type: string
default: libsemigroups/libsemigroups
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run-tests:
name: "${{ inputs.branch }}, ${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macOS-latest"]
include:
- os: "ubuntu-latest"
compiler: "ccache g++"
- os: "macOS-latest"
compiler: "ccache clang++"
runs-on: ${{ matrix.os }}
timeout-minutes: 15
env:
CXX: "ccache ${{ matrix.compiler }}"
CXXFLAGS: "-O2 -g"
UV_NO_SYNC: "1"
LD_LIBRARY_PATH: "/usr/local/lib"
steps:
# Setup environment
- uses: actions/checkout@v5
- name: Set up Python . . .
uses: actions/setup-python@v6
with:
python-version-file: "pyproject.toml"
- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
# Build libsemigroups
- name: "macOS only: Install libsemigroups dependencies . . ."
if: ${{ matrix.os == 'macOS-latest' }}
run: brew install autoconf automake libtool
- name: "Setup ccache . . ."
uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
install_ccache: true
- name: "Install libsemigroups . . ."
run: |
git clone --depth 1 --branch ${{ inputs.branch }} https://github.com/${{ inputs.fork }}.git
cd libsemigroups
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" && sudo make install -j4
ccache -s
# Build libsemigroups_pybind11
- name: "Install libsemigroups_pybind11 . . ."
run: uv sync --verbose --locked --all-extras
# Run the tests
- name: "Running tests . . ."
run: uv run pytest
- name: "Running doc tests . . ."
run: uv run make doctest