[CI] Get the test containers to run the test-program
This commit is contained in:
Родитель
72ebba8c3e
Коммит
043cfd18d4
|
@ -5,7 +5,7 @@ on:
|
|||
- 'docker/**'
|
||||
- '.github/workflows/build_containers.yml'
|
||||
jobs:
|
||||
build_skiabuild-64:
|
||||
build_skiabuild:
|
||||
runs-on: [self-hosted, linux, x64]
|
||||
container: jameswalmsley/container-builder:latest
|
||||
steps:
|
||||
|
@ -19,7 +19,7 @@ jobs:
|
|||
username: ${{ secrets.JAMES_DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.JAMES_DOCKER_HUB_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
- name: Build skiabuild:latest
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: docker/skiabuild
|
||||
|
@ -27,3 +27,42 @@ jobs:
|
|||
push: true
|
||||
tags: jameswalmsley/skiabuild:latest
|
||||
|
||||
|
||||
|
||||
build_skiatest-archlinux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v2
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.JAMES_DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.JAMES_DOCKER_HUB_PASSWORD }}
|
||||
- name: Build skiatest:archlinux
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: docker/skiabuild
|
||||
file: docker/skiabuild/skiatest-archlinux.Dockerfile
|
||||
push: true
|
||||
tags: jameswalmsley/skiatest:archlinux
|
||||
|
||||
build_skiatest-debian:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v2
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.JAMES_DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.JAMES_DOCKER_HUB_PASSWORD }}
|
||||
- name: Build skiatest:debian
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: docker/skiabuild
|
||||
file: docker/skiabuild/skiatest-debian.Dockerfile
|
||||
push: true
|
||||
tags: jameswalmsley/skiatest:debian
|
||||
|
|
|
@ -30,30 +30,62 @@ jobs:
|
|||
test_skia_archlinux:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build_skia_64
|
||||
container: archlinux:latest
|
||||
steps:
|
||||
- run: echo "Testing skia shim on archlinux"
|
||||
|
||||
test_skia_fedora:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build_skia_64
|
||||
container: fedora:latest
|
||||
container: jameswalmsley/skiatest:archlinux
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
- run: echo "Testing skia shim on archlinux"
|
||||
- name: Test skialib with testprog
|
||||
run: |
|
||||
mkdir out
|
||||
cd out && tar xvf ../libskia-x86_64-linux-gnu/sysroot.tar.gz
|
||||
LD_LIBRARY_PATH=$(pwd)/usr/local/lib64 ./usr/local/bin/testprog
|
||||
md5sum *.png
|
||||
|
||||
test_skia_debian:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build_skia_64
|
||||
container: debian:latest
|
||||
container: jameswalmsley/skiatest:debian
|
||||
steps:
|
||||
- run: echo "Testing skia shim on archlinux"
|
||||
- uses: actions/download-artifact@v3
|
||||
- run: echo "Testing skia shim on debian"
|
||||
- name: Test skialib with testprog
|
||||
run: |
|
||||
mkdir out
|
||||
cd out && tar xvf ../libskia-x86_64-linux-gnu/sysroot.tar.gz
|
||||
LD_LIBRARY_PATH=$(pwd)/usr/local/lib64 ./usr/local/bin/testprog
|
||||
md5sum *.png
|
||||
|
||||
# test_skia_fedora:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: build_skia_64
|
||||
# container: fedora:latest
|
||||
# steps:
|
||||
# - uses: actions/download-artifact@v3
|
||||
# - run: echo "Testing skia shim on fedora"
|
||||
# - name: Test skialib with testprog
|
||||
# run: |
|
||||
# mkdir out
|
||||
# cd out && tar xvf ../libskia-x86_64-linux-gnu/sysroot.tar.gz
|
||||
# ls -la && pwd
|
||||
# ls -la ./usr/local/bin
|
||||
# LD_LIBRARY_PATH=$(pwd)/usr/local/lib64 ./usr/local/bin/testprog
|
||||
|
||||
|
||||
# test_skia_alpine:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: build_skia_64
|
||||
# container: alpine:latest
|
||||
# steps:
|
||||
# - uses: actions/download-artifact@v3
|
||||
# - run: echo "Testing skia shim on alpine linux"
|
||||
# - name: Test skialib with testprog
|
||||
# run: |
|
||||
# mkdir out
|
||||
# cd out && tar xvf ../libskia-x86_64-linux-gnu/sysroot.tar.gz
|
||||
# ls -la && pwd
|
||||
# ls -la ./usr/local/bin
|
||||
# LD_LIBRARY_PATH=$(pwd)/usr/local/lib64 ./usr/local/bin/testprog
|
||||
|
||||
test_skia_alpine:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build_skia_64
|
||||
container: alpine:latest
|
||||
steps:
|
||||
- run: echo "Testing skia shim on archlinux"
|
||||
|
||||
release_libskia:
|
||||
needs: [build_skia_64]
|
||||
|
|
21
Makefile
21
Makefile
|
@ -6,22 +6,7 @@ DOCKER_IMAGE:=skiabuild
|
|||
DOCKER:=skiabuild
|
||||
CONTAINER?=skiabuild
|
||||
|
||||
|
||||
# all:
|
||||
# cd skia && python ./tools/git-sync-deps
|
||||
# cd skia && ./bin/gn gen out/Shared --args='is_official_build=true skia_use_system_harfbuzz=false is_component_build=true'
|
||||
# cd skia/out/Shared && ninja -j16
|
||||
|
||||
|
||||
# docker.build:
|
||||
# cd docker/$(DOCKER) && BASE=$(shell pwd) docker-compose build $(CONTAINER)
|
||||
|
||||
# docker.pull:
|
||||
# cd docker/$(DOCKER) && BASE=$(shell pwd) docker-compose pull $(CONTAINER)
|
||||
|
||||
# .PHONY: docker
|
||||
# docker:
|
||||
# cd docker/$(DOCKER) && BASE=$(shell pwd) CURRENT_DIR=$(shell pwd) CURRENT_UID=$(shell id -u) \
|
||||
# CURRENT_GID=$(shell id -g) CURRENT_USER=$(shell whoami) docker-compose run --rm $(CONTAINER) /bin/bash
|
||||
|
||||
.PHONY:test
|
||||
test:
|
||||
LD_LIBRARY_PATH=$(SYSROOT)/$(PREFIX)/$(LIBDIR) $(SYSROOT)/$(PREFIX)/bin/testprog
|
||||
|
||||
|
|
|
@ -32,3 +32,56 @@ services:
|
|||
image: jameswalmsley/skiabuild:latest
|
||||
volumes:
|
||||
- /home/${CURRENT_USER}:/home/${CURRENT_USER}
|
||||
|
||||
skiatest_archlinux:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: skiatest-archlinux.Dockerfile
|
||||
image: jameswalmsley/skiatest:archlinux
|
||||
volumes:
|
||||
- /home/${CURRENT_USER}:/home/${CURRENT_USER}
|
||||
- ./entrypoint.sh:/entrypoint.sh
|
||||
- ./userentry.sh:/userentry.sh
|
||||
- /tmp/.X11-unix:/tmp/.X11-unix
|
||||
- /dev:/dev
|
||||
- /tmp:/tmp
|
||||
environment:
|
||||
- DISPLAY
|
||||
- CURRENT_UID
|
||||
- CURRENT_GID
|
||||
- CURRENT_USER
|
||||
- CURRENT_DIR
|
||||
- TERM=xterm-256color
|
||||
hostname: skiatest
|
||||
stdin_open: true
|
||||
tty: true
|
||||
privileged: true
|
||||
entrypoint: /entrypoint.sh
|
||||
working_dir: /work
|
||||
|
||||
skiatest_debian:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: skiatest-debian.Dockerfile
|
||||
image: jameswalmsley/skiatest:debian
|
||||
volumes:
|
||||
- /home/${CURRENT_USER}:/home/${CURRENT_USER}
|
||||
- ./entrypoint.sh:/entrypoint.sh
|
||||
- ./userentry.sh:/userentry.sh
|
||||
- /tmp/.X11-unix:/tmp/.X11-unix
|
||||
- /dev:/dev
|
||||
- /tmp:/tmp
|
||||
environment:
|
||||
- DISPLAY
|
||||
- CURRENT_UID
|
||||
- CURRENT_GID
|
||||
- CURRENT_USER
|
||||
- CURRENT_DIR
|
||||
- TERM=xterm-256color
|
||||
hostname: skiatest
|
||||
stdin_open: true
|
||||
tty: true
|
||||
privileged: true
|
||||
entrypoint: /entrypoint.sh
|
||||
working_dir: /work
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
FROM archlinux:latest
|
||||
|
||||
RUN pacman --noconfirm -Syu \
|
||||
sudo \
|
||||
libgl \
|
||||
make \
|
||||
which
|
|
@ -0,0 +1,6 @@
|
|||
FROM debian:latest
|
||||
RUN apt-get -y update && \
|
||||
apt-get -y install \
|
||||
sudo \
|
||||
libgl1-mesa-glx \
|
||||
make
|
|
@ -7,7 +7,7 @@ skia:=$(LSTAMP)/skia
|
|||
skia_sync_deps:=$(LSTAMP)/skia_sync_deps
|
||||
skia_config:=$(LSTAMP)/skia_config
|
||||
skia_install:=$(LSTAMP)/skia_install
|
||||
skia_pkgconfig:=$(LSTAMP)/skia_pkgconfig
|
||||
skia_pkgconfig:=$(SYSROOT)/$(PREFIX)/$(LIBDIR)/pkgconfig/skia.pc
|
||||
|
||||
$(call git_clone, skia, https://github.com/google/skia.git, $(SKIA_GIT_REF))
|
||||
|
||||
|
@ -63,7 +63,7 @@ $(skia_install): $(skia)
|
|||
$(stamp)
|
||||
|
||||
$(skia_pkgconfig): $(skia_install)
|
||||
cp $(BASE_skia)/skia.pc.in $(SYSROOT)/usr/local/lib64/pkgconfig/skia.pc
|
||||
cp $(BASE_skia)/skia.pc.in $@
|
||||
|
||||
|
||||
$(L).clean:
|
||||
|
|
|
@ -8,13 +8,13 @@ PREFIX=usr/local
|
|||
LIBDIR=lib64
|
||||
export LIBRARY_PATH="$(SYSROOT)/$(PREFIX)/$(LIBDIR):$(SYSROOT)/usr/lib64"
|
||||
|
||||
ifneq ($(shell which distcc),)
|
||||
ifneq ($(shell which distcc 2> /dev/null),)
|
||||
export DISTCC_HOSTS=10.1.0.16/4 10.1.0.24/32 10.1.0.40/20 10.1.0.48/16
|
||||
export CC:=distcc $(CC)
|
||||
export CXX:=distcc $(CXX)
|
||||
endif
|
||||
|
||||
ifneq ($(shell which distcc),)
|
||||
ifneq ($(shell which distcc 2> /dev/null),)
|
||||
ifdef DISTCC_HOSTS
|
||||
BUILD_JOBS=-j $$(distcc -j)
|
||||
testy:
|
||||
|
|
Загрузка…
Ссылка в новой задаче