👷 add dockerfile
This commit is contained in:
parent
d051d34cda
commit
fef5fbd4f8
|
@ -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
|
|
@ -37,6 +37,7 @@ jobs:
|
||||||
arch="${{ matrix.arch }}"
|
arch="${{ matrix.arch }}"
|
||||||
echo ::set-output name=PLATFORM::${arch%% *}
|
echo ::set-output name=PLATFORM::${arch%% *}
|
||||||
echo ::set-output name=ARCH::${arch##* }
|
echo ::set-output name=ARCH::${arch##* }
|
||||||
|
|
||||||
- name: Build ${{ matrix.arch }} release
|
- name: Build ${{ matrix.arch }} release
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -45,14 +46,3 @@ jobs:
|
||||||
-f .github/archlinux/Dockerfile \
|
-f .github/archlinux/Dockerfile \
|
||||||
--load \
|
--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
|
|
||||||
|
|
Loading…
Reference in New Issue