👷 add dockerfile

This commit is contained in:
Vladislav Nepogodin 2022-06-07 16:57:45 +04:00
parent d051d34cda
commit fef5fbd4f8
No known key found for this signature in database
GPG Key ID: B62C3D10C54D5DA9
2 changed files with 24 additions and 11 deletions

23
.github/archlinux/Dockerfile vendored Normal file
View File

@ -0,0 +1,23 @@
FROM archlinux/archlinux:base-devel
WORKDIR /app
COPY . .
RUN pacman -Syu --noconfirm --noprogressbar git rustup glib2 gtk3 pkg-config meson
RUN useradd -d /app builder
RUN echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER builder
RUN echo "Reading /etc/os-release" \
cat /etc/os-release || true
RUN sudo chown builder:builder .
RUN rustup toolchain install nightly
RUN rustup component add cargo
RUN rustup component add clippy
RUN meson --prefix=/usr build
RUN echo "============ Running build =============" && cargo build --verbose
RUN echo "============ Running test =============" && cargo test --verbose

View File

@ -37,6 +37,7 @@ jobs:
arch="${{ matrix.arch }}"
echo ::set-output name=PLATFORM::${arch%% *}
echo ::set-output name=ARCH::${arch##* }
- name: Build ${{ matrix.arch }} release
shell: bash
run: |
@ -45,14 +46,3 @@ jobs:
-f .github/archlinux/Dockerfile \
--load \
.
- name: Install dependencies
run: |
sudo apt update
sudo apt install build-essential pkg-config libglib2.0-dev libgtk-3-dev
shell: bash
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose