| 1 |
name: cygwin |
| 2 |
|
| 3 |
concurrency: |
| 4 |
group: cygwin-${{ github.head_ref || github.ref }} |
| 5 |
cancel-in-progress: true |
| 6 |
|
| 7 |
on: |
| 8 |
push: |
| 9 |
branches: |
| 10 |
- master |
| 11 |
# Stable branches such as 0.56 or 1.0 |
| 12 |
- '[0-9]+.[0-9]+' |
| 13 |
paths: |
| 14 |
- "mesonbuild/**" |
| 15 |
- "test cases/**" |
| 16 |
- "unittests/**" |
| 17 |
- ".github/workflows/cygwin.yml" |
| 18 |
- "run*tests.py" |
| 19 |
pull_request: |
| 20 |
paths: |
| 21 |
- "mesonbuild/**" |
| 22 |
- "test cases/**" |
| 23 |
- "unittests/**" |
| 24 |
- ".github/workflows/cygwin.yml" |
| 25 |
- "run*tests.py" |
| 26 |
|
| 27 |
permissions: |
| 28 |
contents: read |
| 29 |
|
| 30 |
jobs: |
| 31 |
test: |
| 32 |
runs-on: windows-latest |
| 33 |
name: ${{ matrix.NAME }} |
| 34 |
strategy: |
| 35 |
fail-fast: false |
| 36 |
matrix: |
| 37 |
include: |
| 38 |
- NAME: gccx64ninja |
| 39 |
ARCH: x86_64 |
| 40 |
env: |
| 41 |
MESON_CI_JOBNAME: cygwin-${{ matrix.NAME }} |
| 42 |
|
| 43 |
steps: |
| 44 |
# remove inheritable permissions since they break assumptions testsuite |
| 45 |
# makes about file modes |
| 46 |
- run: icacls . /inheritance:r /T /C |
| 47 |
|
| 48 |
- run: git config --global core.autocrlf input |
| 49 |
|
| 50 |
- uses: actions/checkout@v4 |
| 51 |
|
| 52 |
- uses: cygwin/cygwin-install-action@v6 |
| 53 |
with: |
| 54 |
platform: ${{ matrix.ARCH }} |
| 55 |
packages: | |
| 56 |
cmake |
| 57 |
gcc-fortran |
| 58 |
gcc-objc++ |
| 59 |
gcc-objc |
| 60 |
git |
| 61 |
gobject-introspection |
| 62 |
gtk-doc |
| 63 |
libboost-devel |
| 64 |
libglib2.0-devel |
| 65 |
libgtk3-devel |
| 66 |
libxml2-devel |
| 67 |
libxslt-devel |
| 68 |
make |
| 69 |
ninja |
| 70 |
python2-devel |
| 71 |
python3-devel |
| 72 |
python3-libxml2 |
| 73 |
python3-libxslt |
| 74 |
python3-gi |
| 75 |
python39-pip |
| 76 |
python39-wheel |
| 77 |
vala |
| 78 |
zlib-devel |
| 79 |
|
| 80 |
- name: Find pip cache dir |
| 81 |
id: pip-cache |
| 82 |
run: | |
| 83 |
export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32 |
| 84 |
echo "dir=$(cygpath -wa $(python3 -m pip cache dir))" >> "$GITHUB_OUTPUT" |
| 85 |
shell: bash --noprofile --norc -o igncr -eo pipefail '{0}' |
| 86 |
|
| 87 |
- uses: actions/cache/restore@v4 |
| 88 |
id: restore-cache |
| 89 |
with: |
| 90 |
path: ${{ steps.pip-cache.outputs.dir }} |
| 91 |
key: cygwin-pip-${{ github.run_number }} |
| 92 |
restore-keys: cygwin-pip- |
| 93 |
|
| 94 |
- name: Run pip |
| 95 |
run: | |
| 96 |
export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32 |
| 97 |
python3 -m pip --disable-pip-version-check install gcovr fastjsonschema pefile pytest pytest-subtests pytest-xdist |
| 98 |
shell: bash --noprofile --norc -o igncr -eo pipefail '{0}' |
| 99 |
|
| 100 |
- uses: actions/cache/save@v4 |
| 101 |
with: |
| 102 |
path: ${{ steps.pip-cache.outputs.dir }} |
| 103 |
key: cygwin-pip-${{ github.run_number }} |
| 104 |
|
| 105 |
- name: Run tests |
| 106 |
run: | |
| 107 |
export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32 |
| 108 |
python3 ./run_tests.py --backend=ninja |
| 109 |
env: |
| 110 |
# Cygwin's static boost installation is broken (some static library |
| 111 |
# variants such as boost_thread are not present) |
| 112 |
SKIP_STATIC_BOOST: 1 |
| 113 |
shell: bash --noprofile --norc -o igncr -eo pipefail '{0}' |
| 114 |
|
| 115 |
- uses: actions/upload-artifact@v4 |
| 116 |
with: |
| 117 |
name: ${{ matrix.NAME }} |
| 118 |
path: meson-test-run.* |
| 119 |
# test log should be saved on failure |
| 120 |
if: ${{ !cancelled() }} |