Skip to content

Commit e168c3d

Browse files
eli-schwartznirbheek
authored andcommitted
Add stable regression test
This tests stable maintenance branches, to ensure that build directories created with older versions of Meson continue to work without wiping, after updating to a bugfix release.
1 parent 20bbe1b commit e168c3d

File tree

7 files changed

+72
-0
lines changed

7 files changed

+72
-0
lines changed

.github/workflows/stable_builddir.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: stable build directories
2+
3+
on:
4+
push:
5+
branches:
6+
- '[0-9]+.[0-9]+'
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
regression:
13+
runs-on: ubuntu-latest
14+
env:
15+
TESTDIR: "manual tests/13 builddir upgrade"
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: install ninja
19+
run: sudo apt-get -y install build-essential ninja-build
20+
- name: Fetch tags and unshallow
21+
run: git fetch --unshallow --tags
22+
- name: Checkout latest release on this branch
23+
run: |
24+
cp -r "$TESTDIR" "$TESTDIR"-temp
25+
git checkout "$(git describe --abbrev=0)"
26+
- name: Configure with most recent tag
27+
run: ./meson.py setup "$TESTDIR"-temp builddir
28+
- name: Return to testing commit
29+
run: git checkout $GITHUB_SHA
30+
- name: check that everything still works
31+
run: |
32+
./meson.py compile -C builddir
33+
ninja -C builddir test
34+
DESTDIR=pkg ninja -C builddir install
35+
./meson.py introspect builddir --all

manual tests/13 builddir upgrade/data/foo.dat

Whitespace-only changes.

manual tests/13 builddir upgrade/foo.1

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <stdio.h>
2+
3+
int main() {
4+
printf("Hello world!\n");
5+
return 0;
6+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#if defined _WIN32 || defined __CYGWIN__
2+
#define DLL_PUBLIC __declspec(dllexport)
3+
#else
4+
#define DLL_PUBLIC
5+
#endif
6+
7+
int DLL_PUBLIC foo(void) {
8+
return 0;
9+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
project('check old builddirs in a stable release', 'c')
2+
3+
lib = both_libraries('lib', 'lib.c')
4+
exe = executable('foo', 'foo.c', link_with: lib, install: true)
5+
test('exe', exe)
6+
7+
install_data('data/foo.dat', install_dir: get_option('datadir') / 'foo')
8+
install_man('foo.1')
9+
10+
py = import('python').find_installation()
11+
py.install_sources('mod.py', subdir: 'foo')
12+
install_subdir('data', install_dir: py.get_install_dir())
13+
14+
custom_target(
15+
input: 'mod.py',
16+
output: 'hello.dat',
17+
command: [py, '@INPUT@'],
18+
capture: true,
19+
install: true,
20+
install_dir: get_option('localstatedir') / 'foo',
21+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print('Hello world!')

0 commit comments

Comments
 (0)