Skip to content

Commit

Permalink
Build in arch
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Senichev <[email protected]>
  • Loading branch information
artemsen committed Jul 7, 2024
1 parent 8c34cc7 commit 34a892b
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 54 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/Check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 -Dversion=${{steps.version.outputs.VERSION}} -Dtests=enabled --prefix=/usr /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
19 changes: 19 additions & 0 deletions .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM archlinux:latest

RUN pacman --sync --sysupgrade --refresh --refresh --noconfirm \
clang \
gtest \
meson

RUN useradd --create-home builder

ENV USER=builder
ENV HOME=/home/builder

ENV CC="clang"
ENV CXX="clang++"
ENV CFLAGS="-g -fsanitize=address"
ENV CXXFLAGS="-g -fsanitize=address"
ENV LDFLAGS="-fsanitize=address"

USER builder
54 changes: 0 additions & 54 deletions .github/workflows/unittests.yml

This file was deleted.

0 comments on commit 34a892b

Please sign in to comment.