Welcome to mirror list, hosted at ThFree Co, Russian Federation.

config.yml « workflows « .github - github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cd9d7d41a674db7fee78439fdea3f243121a9702 (plain)
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Config heavy

on:
  schedule: [cron: '0 16 * * *']

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  repo-check:
    name: Repository commit check
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3
        with:
          submodules: false

      - id: commit-check
        run: echo "has-commits=$(./scripts/has-commits-since.sh '24 hours ago')" >> $GITHUB_OUTPUT

    outputs:
      has-commits: ${{ steps.commit-check.outputs.has-commits }}

  config_all:
    name: ${{ matrix.system.name }} ${{ matrix.conf.configure_flags }}
    runs-on: ${{ matrix.system.os }}
    needs: repo-check
    if: needs.repo-check.outputs.has-commits == 'true'
    strategy:
      max-parallel: 8
      matrix:
        system:
          - name: Windows
            os: windows-latest
          - name: macOS
            os: macos-12
          - name: Linux
            os: ubuntu-20.04
        conf:
          - configure_flags:  -Duse_slirp=false
          - configure_flags:  -Duse_sdl2_net=false
          - configure_flags:  -Duse_opengl=false         # TODO opengl is always disabled on msys2
          - configure_flags:  -Duse_fluidsynth=false
          - configure_flags:  -Duse_png=false
          - configure_flags:  -Denable_debugger=normal
          - configure_flags:  -Denable_debugger=heavy
          - configure_flags:  -Ddynamic_core=dyn-x86
          - configure_flags:  -Ddynamic_core=dynrec
          - configure_flags:  -Ddynamic_core=none

    env:
      CHERE_INVOKING: yes

    steps:
      - name: Checkout repository
        uses: actions/checkout@v3
        with:
          submodules: false

      - name:  Check repo for commits
        id:    repo-meta
        shell: bash
        run:   echo "has-commits=$(./scripts/has-commits-since.sh '24 hours ago')" >> $GITHUB_OUTPUT
      - name:  Get Date
        id:    get-date
        if:    matrix.system.name == 'Windows'
        shell: bash
        run:   echo "date=$(date +%Y-%W)" >> $GITHUB_OUTPUT

      - uses:  actions/cache@v3.0.11
        id:    cache-msys2
        if:    matrix.system.name == 'Windows'
        with:
          path: 'C:/tools/msys64'
          key: msys2-64-${{ steps.get-date.outputs.date }}-6

      - name:  Install MSYS2 (Windows)
        if:    >
          matrix.system.name == 'Windows' &&
          steps.cache-msys2.outputs.cache-hit != 'true'
        run:   choco install msys2 --no-progress

      - name:  Install dependencies ${{ matrix.conf.without_packages }} (Windows)
        if:    >
          matrix.system.name == 'Windows' &&
          steps.cache-msys2.outputs.cache-hit != 'true'
        shell: python scripts\msys-bash.py {0}
        run: |
           pacman -S --noconfirm $(cat packages/windows-latest-msys2.txt)
           .github/scripts/shrink-msys2.sh

      - name:  Install dependencies (Linux)
        if:    matrix.system.name == 'Linux'
        run: |
          sudo apt-get -y update
          sudo apt-get install $(cat packages/ubuntu-20.04-apt.txt)
          sudo pip3 install --upgrade meson ninja

      - name:  Install dependencies (macOS)
        if:    matrix.system.name == 'macOS'
        run: |
          brew install $(cat packages/macos-12-brew.txt)

      # Workaround frequent HTTPS-based connectivity issues
      # https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/407
      - name:  Fetch the libffi subproject for Glib
        run: ./scripts/fetch-libffi-subproject.sh

      - name:  Build ${{ matrix.conf.configure_flags }} (Windows)
        if:    matrix.system.name == 'Windows'
        shell: python scripts\msys-bash.py {0}
        run: |
          export PATH="/mingw64/bin:$PATH"
          meson setup \
            -Dbuildtype=debug \
            -Dunit_tests=disabled \
            -Duse_opengl=false \
            ${{ matrix.conf.configure_flags }} \
            build
          cat build/meson-logs/meson-log.txt
          meson compile -C build

      - name:  Build ${{ matrix.conf.configure_flags }} (${{ matrix.system.name }})
        if:    matrix.system.name == 'macOS' || matrix.system.name == 'Linux'
        run: |
          meson setup \
            -Dunit_tests=disabled \
            ${{ matrix.conf.configure_flags }} \
            build
          meson compile -C build