-
Notifications
You must be signed in to change notification settings - Fork 30
41 lines (30 loc) · 1.07 KB
/
Check.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
name: Check
on:
push:
pull_request:
# branches: [ "master" ]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get swayimg version
run: echo "VERSION=$(git describe --tags --long --always | sed 's/^v//;s/-/./')" >> $GITHUB_OUTPUT
id: version
- name: Build docker image
run: docker build --tag swayimg .github/workflows
- name: Run docker container
run: docker run --tty --detach --name=swayimg --volume=$PWD:$PWD:ro --workdir=$PWD swayimg
- name: Build swayimg
run: |
docker exec swayimg meson setup -Dversion=${{steps.version.outputs.VERSION}} -Dtests=enabled --prefix=/usr /tmp/build
docker exec swayimg ninja -C /tmp/build
- name: Check install
run: |
docker exec swayimg env DESTDIR=/tmp/install ninja -C /tmp/build install
docker exec swayimg /tmp/install/usr/bin/swayimg --version
- name: Run unit tests
run: docker exec swayimg meson test --verbose -C /tmp/build