|
| 1 | +# Tests that pygame can compile on MSYS2 |
| 2 | +name: MSYS2 |
| 3 | + |
| 4 | +# Run CI only on changes to main branch, or any PR to main. Do not run CI on |
| 5 | +# any other branch. Also, skip any non-source changes from running on CI |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: main |
| 9 | + paths-ignore: |
| 10 | + - 'docs/**' |
| 11 | + - 'examples/**' |
| 12 | + - '.gitignore' |
| 13 | + - '*.rst' |
| 14 | + - '*.md' |
| 15 | + - '.github/workflows/*.yml' |
| 16 | + # re-include current file to not be excluded |
| 17 | + - '!.github/workflows/build-on-msys2.yml' |
| 18 | + |
| 19 | + pull_request: |
| 20 | + branches: main |
| 21 | + paths-ignore: |
| 22 | + - 'docs/**' |
| 23 | + - 'examples/**' |
| 24 | + - '.gitignore' |
| 25 | + - '*.rst' |
| 26 | + - '*.md' |
| 27 | + - '.github/workflows/*.yml' |
| 28 | + # re-include current file to not be excluded |
| 29 | + - '!.github/workflows/build-on-msys2.yml' |
| 30 | + |
| 31 | +concurrency: |
| 32 | + group: ${{ github.workflow }}-${{ github.ref }}-msys2 |
| 33 | + cancel-in-progress: true |
| 34 | + |
| 35 | +jobs: |
| 36 | + msys2: |
| 37 | + runs-on: windows-latest |
| 38 | + defaults: |
| 39 | + run: |
| 40 | + shell: msys2 {0} |
| 41 | + strategy: |
| 42 | + matrix: |
| 43 | + include: |
| 44 | + - { sys: mingw64, env: x86_64 } |
| 45 | + - { sys: mingw32, env: i686 } |
| 46 | + - { sys: ucrt64, env: ucrt-x86_64 } |
| 47 | + - { sys: clang32, env: clang-i686 } |
| 48 | + - { sys: clang64, env: clang-x86_64 } |
| 49 | + # - { sys: clangarm64, env: clang-aarch64 } |
| 50 | + |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v3 |
| 53 | + - uses: msys2/setup-msys2@v2 |
| 54 | + with: |
| 55 | + msystem: ${{ matrix.sys }} |
| 56 | + update: true |
| 57 | + install: >- |
| 58 | + mingw-w64-${{ matrix.env }}-gcc |
| 59 | + mingw-w64-${{ matrix.env }}-pkg-config |
| 60 | + mingw-w64-${{ matrix.env }}-python |
| 61 | + mingw-w64-${{ matrix.env }}-python-pip |
| 62 | + mingw-w64-${{ matrix.env }}-python-sphinx |
| 63 | + mingw-w64-${{ matrix.env }}-meson-python |
| 64 | +
|
| 65 | + # mingw-w64-${{ matrix.env }}-SDL2 |
| 66 | + # mingw-w64-${{ matrix.env }}-SDL2_image |
| 67 | + # mingw-w64-${{ matrix.env }}-SDL2_mixer |
| 68 | + # mingw-w64-${{ matrix.env }}-SDL2_ttf |
| 69 | + # mingw-w64-${{ matrix.env }}-freetype |
| 70 | + # mingw-w64-${{ matrix.env }}-portmidi |
| 71 | + |
| 72 | + - name: Building pygame wheel |
| 73 | + run: | |
| 74 | + python3 setup.py docs |
| 75 | + pip3 wheel . --wheel-dir /artifacts -vvv --no-build-isolation |
| 76 | +
|
| 77 | + - name: Installing wheel |
| 78 | + run: pip3 install --no-index --pre --find-links /artifacts pygame-ce |
| 79 | + |
| 80 | + - name: Run tests |
| 81 | + env: |
| 82 | + SDL_VIDEODRIVER: "dummy" |
| 83 | + SDL_AUDIODRIVER: "disk" |
| 84 | + run: python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300 |
0 commit comments