|
5 | 5 | branches: [ "master" ]
|
6 | 6 | pull_request:
|
7 | 7 | branches: [ "master" ]
|
| 8 | + schedule: |
| 9 | + # Schedule for testing with the latest NGINX to run at 00:00 on the first day of every month |
| 10 | + - cron: '0 0 1 * *' |
8 | 11 |
|
9 | 12 | jobs:
|
10 | 13 | build:
|
11 | 14 |
|
12 | 15 | runs-on: ubuntu-latest
|
| 16 | + strategy: |
| 17 | + max-parallel: 2 |
| 18 | + matrix: |
| 19 | + nginx-branch: [stable, mainline] |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v3 |
13 | 22 |
|
14 |
| - env: |
15 |
| - NGINX_VERSION: nginx-1.22.1 |
| 23 | + - name: Install build and test dependencies |
| 24 | + run: | |
| 25 | + sudo apt-get --yes update |
| 26 | + sudo apt-get install --yes libpcre3-dev libssl-dev perl cpanminus |
16 | 27 |
|
17 |
| - steps: |
18 |
| - - uses: actions/checkout@v3 |
19 |
| - - name: download nginx |
20 |
| - working-directory: ../ |
21 |
| - run: wget https://nginx.org/download/${{env.NGINX_VERSION}}.tar.gz |
22 |
| - - name: uncompress nginx |
23 |
| - working-directory: ../ |
24 |
| - run: tar zxvf ${{env.NGINX_VERSION}}.tar.gz |
25 |
| - - name: configure (build into nginx) |
26 |
| - working-directory: ../${{env.NGINX_VERSION}} |
27 |
| - run: ./configure --add-module=../nginx-http-flv-module |
28 |
| - - name: make |
29 |
| - working-directory: ../${{env.NGINX_VERSION}} |
30 |
| - run: make |
31 |
| - - name: clean |
32 |
| - working-directory: ../${{env.NGINX_VERSION}} |
33 |
| - run: make clean |
34 |
| - - name: configure (build as a dynamic module) |
35 |
| - working-directory: ../${{env.NGINX_VERSION}} |
36 |
| - run: ./configure --add-dynamic-module=../nginx-http-flv-module |
37 |
| - - name: make |
38 |
| - working-directory: ../${{env.NGINX_VERSION}} |
39 |
| - run: make |
40 |
| - - name: remove |
41 |
| - working-directory: ../ |
42 |
| - run: rm -rf "${{env.NGINX_VERSION}}*" |
| 28 | + - name: Create NGINX download directory |
| 29 | + run: mkdir nginx |
| 30 | + |
| 31 | + - name: Download ${{ matrix.nginx-branch }} NGINX |
| 32 | + uses: dvershinin/[email protected] |
| 33 | + with: |
| 34 | + repository: 'nginx' |
| 35 | + action: 'unzip' |
| 36 | + branch: ${{ matrix.nginx-branch }} |
| 37 | + working_directory: ./nginx |
| 38 | + |
| 39 | + - name: Configure NGINX to compile with the module dynamically |
| 40 | + run: | |
| 41 | + cd nginx && ./configure --with-debug --add-dynamic-module=.. |
| 42 | +
|
| 43 | + - name: Make NGINX module |
| 44 | + run: | |
| 45 | + cd nginx && make -j$(nproc) modules |
0 commit comments