-
Notifications
You must be signed in to change notification settings - Fork 10
142 lines (138 loc) · 3.71 KB
/
main.yml
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
133
134
135
136
137
138
139
140
141
142
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push, or for pull requests against master
push:
branches:
- '**'
# Only build release tags.
tags:
- v*
paths-ignore:
- NEWS
pull_request:
branches: [ master ]
paths-ignore:
- NEWS
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
makedist:
# Need 24.04 for netpbm with pamtowinicon
runs-on: 'ubuntu-24.04'
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
show-progress: false
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install \
gettext \
libwxgtk3.2-dev \
libavcodec-dev \
libavformat-dev \
libgdal-dev \
libproj-dev \
libswscale-dev \
ghostscript \
inkscape \
netpbm \
liblocale-po-perl \
unifont \
python3-sphinx \
latexmk \
texlive-latex-extra \
tex-gyre \
w3m
- name: bootstrap source tree
run: |
autoreconf -fiv
git checkout INSTALL
- name: configure
run: ./configure --enable-werror CC='ccache gcc' CXX='ccache g++'
- name: make
run: make -j2
- name: Run tests
run: |
make check VERBOSE=1
- name: Check generated files are in .gitignore
# grep '^' passes through all input while giving a non-zero exit status
# if that input is empty.
run: |
printf '%s\n' .ccache > ".git/info/exclude"
git status --porcelain|grep '^' && { echo "The generated files listed above are not in .gitignore" ; exit 1; }; true
- name: Create distribution tarball
run: |
make dist
- uses: actions/upload-artifact@v4
with:
path: |
survex-*.tar.gz
# Files are already compressed so don't try to compress again.
compression-level: 0
retention-days: 1
if-no-files-found: error
msys2-ucrt64:
runs-on: 'windows-latest'
needs: makedist
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ucrt64
install: base-devel
pacboy: >-
gcc:p
ffmpeg:p
proj:p
wxwidgets3.2-msw:p
gdb:p
ntldd:p
gdal:p
pkgconf:p
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ github.job }}
variant: sccache
- name: Fetch distribution
uses: actions/download-artifact@v4
- name: Unpack distribution
run: |
mv artifact/* .
rmdir artifact
tar --strip-components=1 -xf survex-*.tar.gz
- name: configure
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
export CC='sccache gcc'
export CXX='sccache g++'
./configure
- name: make
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
make -j2
- name: Run tests
run: |
PATH=/c/Users/runneradmin/.cargo/bin:$PATH
make check MSGFMT=: VERBOSE=1
- name: Run innosetup
run: |
make mingw_iss RUN_EXE= NTLDD=ntldd PROJ_PREFIX=/ucrt64
- uses: actions/upload-artifact@v4
with:
name: microsoft-windows-installer
path: |
survex-microsoft-windows-*.exe
# Files are already compressed so don't try to compress again.
compression-level: 0
retention-days: 7
if-no-files-found: error