-
Notifications
You must be signed in to change notification settings - Fork 41
89 lines (87 loc) · 2.84 KB
/
main.yml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: abjad
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
env:
PATH: /tmp/lilypond-2.25.22/bin:/home/runner/bin:$PATH
PYTHONUNBUFFERED: "TRUE"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Log environment variables
run: |
python --version
echo HOME:
echo $HOME
echo GITHUB_WORKSPACE:
echo $GITHUB_WORKSPACE
echo PATH:
echo $PATH
echo PYTHONPATH:
echo $PYTHONPATH
- name: Install LilyPond
run: |
lilypond_version=2.25.22
lilypond_archive="lilypond-${lilypond_version}-linux-x86_64.tar.gz"
base_url="https://gitlab.com/lilypond/lilypond/-/releases"
lilypond_url="${base_url}/v${lilypond_version}/downloads/${lilypond_archive}"
echo "Downloading LilyPond from: ${lilypond_url}"
cd /tmp || { echo "Failed to change directory to /tmp"; exit 1; }
wget -q ${lilypond_url}
if [ ! -f "${lilypond_archive}" ]; then
echo "File download failed!" >&2
exit 1
fi
checksum="3e837e811aaa72323863925f0a4b5bd1aff1ed9b997e6c70dbe5c008e47872e7"
echo "${checksum} ${lilypond_archive}" > checksum.txt
if ! sha256sum -c checksum.txt --status; then
echo "Checksum verification failed!" >&2
exit 1
fi
rm checksum.txt
echo "Checksum verified successfully."
tar -xf "${lilypond_archive}"
- name: Install Abjad
run: |
export PATH=/tmp/lilypond-2.25.22/bin:/home/runner/bin:$PATH
export PYTHONUNBUFFERED=TRUE
python -m pip install --upgrade pip coverage
python -m pip install defusedxml
python -m pip install -e .[dev]
python -m pip install black==24.10.0
python -m pip install flake8==7.1.1
python -m pip install isort==5.13.2
python -m pip install mypy==1.14.1
python -m pip install pytest==8.3.4
python -c "import abjad; print(abjad.Configuration().configuration_file_path)"
scr/prime-parser-tables
- name: Log dependency versions
run: |
export PATH=/tmp/lilypond-2.25.22/bin:/home/runner/bin:$PATH
black --version
flake8 --version
isort --version
mypy --version
pip --version
pytest --version
lilypond --version
- name: Run checks and tests
run: |
export PATH=/tmp/lilypond-2.25.22/bin:/home/runner/bin:$PATH
export PYTHONUNBUFFERED=TRUE
make black-check
make flake8
make isort-check
make mypy
make pytest