-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (64 loc) · 1.94 KB
/
Copy pathbuild.yml
File metadata and controls
68 lines (64 loc) · 1.94 KB
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
name: Test building the runner
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build_linux:
name: Build the source distribution
runs-on: ubuntu-latest
outputs:
odkrun_version: ${{ steps.find_version.outputs.odkrun_version }}
steps:
- name: Check out the repository
uses: actions/checkout@v4
- id: find_version
name: Determine current version
run: sed -E -e 's/^AC_INIT\(\[ODK Runner\], \[(.*)\],/odkrun_version=\1/;q' configure.ac >> "$GITHUB_OUTPUT"
- name: Generate the build system
run: autoreconf --install
- name: Configure the distribution
run: ./configure
- name: Build
run: make distcheck
- name: Upload source distribution
uses: actions/upload-artifact@v4
with:
name: source_dist
path: odkrun-${{ steps.find_version.outputs.odkrun_version }}.tar.gz
build_macos:
name: Build for macOS
needs: build_linux
runs-on: macos-15
steps:
- name: Download source distribution
uses: actions/download-artifact@v5
with:
name: source_dist
- name: Build
run: |
tar xf odkrun-${{ needs.build_linux.outputs.odkrun_version }}.tar.gz
cd odkrun-${{ needs.build_linux.outputs.odkrun_version }}
./configure
make
build_windows:
name: Build for Windows
needs: build_linux
runs-on: ubuntu-latest
steps:
- name: Set up MinGW
uses: egor-tensin/setup-mingw@v3
with:
platform: x64
- name: Download source distribution
uses: actions/download-artifact@v5
with:
name: source_dist
- name: Build
run: |
tar xf odkrun-${{ needs.build_linux.outputs.odkrun_version }}.tar.gz
cd odkrun-${{ needs.build_linux.outputs.odkrun_version }}
./configure --host=x86_64-w64-mingw32
make