]> git.tdb.fi Git - ext/openal.git/blob - .github/workflows/ci.yml
Import OpenAL Soft 1.23.1 sources
[ext/openal.git] / .github / workflows / ci.yml
1 name: CI
2
3 on: [push]
4
5 jobs:
6   build:
7     name: ${{matrix.config.name}}
8     runs-on: ${{matrix.config.os}}
9     strategy:
10       fail-fast: false
11       matrix:
12         config:
13         - {
14             name: "Win32-Release",
15             os: windows-latest,
16             cmake_opts: "-A Win32 \
17               -DALSOFT_BUILD_ROUTER=ON \
18               -DALSOFT_REQUIRE_WINMM=ON \
19               -DALSOFT_REQUIRE_DSOUND=ON \
20               -DALSOFT_REQUIRE_WASAPI=ON",
21             build_type: "Release"
22           }
23         - {
24             name: "Win32-Debug",
25             os: windows-latest,
26             cmake_opts: "-A Win32 \
27               -DALSOFT_BUILD_ROUTER=ON \
28               -DALSOFT_REQUIRE_WINMM=ON \
29               -DALSOFT_REQUIRE_DSOUND=ON \
30               -DALSOFT_REQUIRE_WASAPI=ON",
31             build_type: "Debug"
32           }
33         - {
34             name: "Win64-Release",
35             os: windows-latest,
36             cmake_opts: "-A x64 \
37               -DALSOFT_BUILD_ROUTER=ON \
38               -DALSOFT_REQUIRE_WINMM=ON \
39               -DALSOFT_REQUIRE_DSOUND=ON \
40               -DALSOFT_REQUIRE_WASAPI=ON",
41             build_type: "Release"
42           }
43         - {
44             name: "Win64-Debug",
45             os: windows-latest,
46             cmake_opts: "-A x64 \
47               -DALSOFT_BUILD_ROUTER=ON \
48               -DALSOFT_REQUIRE_WINMM=ON \
49               -DALSOFT_REQUIRE_DSOUND=ON \
50               -DALSOFT_REQUIRE_WASAPI=ON",
51             build_type: "Debug"
52           }
53         - {
54             name: "macOS-Release",
55             os: macos-latest,
56             cmake_opts: "-DALSOFT_REQUIRE_COREAUDIO=ON",
57             build_type: "Release"
58           }
59         - {
60             name: "Linux-Release",
61             os: ubuntu-latest,
62             cmake_opts: "-DALSOFT_REQUIRE_RTKIT=ON \
63               -DALSOFT_REQUIRE_ALSA=ON \
64               -DALSOFT_REQUIRE_OSS=ON \
65               -DALSOFT_REQUIRE_PORTAUDIO=ON \
66               -DALSOFT_REQUIRE_PULSEAUDIO=ON \
67               -DALSOFT_REQUIRE_JACK=ON \
68               -DALSOFT_REQUIRE_PIPEWIRE=ON",
69             deps_cmdline: "sudo apt update && sudo apt-get install -qq \
70               libpulse-dev \
71               portaudio19-dev \
72               libasound2-dev \
73               libjack-dev \
74               libpipewire-0.3-dev \
75               qtbase5-dev \
76               libdbus-1-dev",
77             build_type: "Release"
78           }
79
80     steps:
81     - uses: actions/checkout@v1
82
83     - name: Install Dependencies
84       shell: bash
85       run: |
86         if [[ ! -z "${{matrix.config.deps_cmdline}}" ]]; then
87           eval ${{matrix.config.deps_cmdline}}
88         fi
89
90     - name: Configure
91       shell: bash
92       run: |
93         cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} ${{matrix.config.cmake_opts}} .
94
95     - name: Build
96       shell: bash
97       run: |
98         cmake --build build --config ${{matrix.config.build_type}}
99
100     - name: Create Archive
101       if: ${{ matrix.config.os == 'windows-latest' }}
102       shell: bash
103       run: |
104         cd build
105         mkdir archive
106         mkdir archive/router
107         cp ${{matrix.config.build_type}}/soft_oal.dll archive
108         cp ${{matrix.config.build_type}}/OpenAL32.dll archive/router
109
110     - name: Upload Archive
111       # Upload package as an artifact of this workflow.
112       uses: actions/upload-artifact@v3.1.1
113       if: ${{ matrix.config.os == 'windows-latest' }}
114       with:
115         name: soft_oal-${{matrix.config.name}}
116         path: build/archive