-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
400 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: build-test-thirdparty | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
platforms: linux/amd64 | ||
context: . | ||
file: scripts/debian_asan.Dockerfile | ||
tags: debian_asan | ||
outputs: type=docker,dest=/tmp/debian_asan.tar | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: debian_asan | ||
path: /tmp/debian_asan.tar | ||
|
||
thirdparty-tests: | ||
runs-on: ubuntu-latest | ||
needs: docker | ||
strategy: | ||
matrix: | ||
include: | ||
- thirdparty: test_cello | ||
- thirdparty: test_curl | ||
- thirdparty: test_doom | ||
- thirdparty: test_git | ||
- thirdparty: test_libpng | ||
- thirdparty: test_libuev | ||
- thirdparty: test_lua | ||
- thirdparty: test_metalang99 | ||
- thirdparty: test_oniguruma_jq | ||
- thirdparty: test_openssh | ||
- thirdparty: test_openssl | ||
- thirdparty: test_perl | ||
- thirdparty: test_php | ||
- thirdparty: test_postgres | ||
- thirdparty: test_python | ||
- thirdparty: test_qbe_hare | ||
- thirdparty: test_sqlite | ||
- thirdparty: test_tinycc | ||
- thirdparty: test_toxcore | ||
- thirdparty: test_toybox | ||
- thirdparty: test_vim | ||
- thirdparty: test_zlib | ||
- thirdparty: test_zstd | ||
- thirdparty: build_gcc | ||
- thirdparty: build_musl | ||
- thirdparty: build_nano | ||
- thirdparty: build_sdl | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: debian_asan | ||
path: /tmp | ||
|
||
- name: Load image | ||
run: docker load --input /tmp/debian_asan.tar | ||
|
||
- name: Run test | ||
run: > | ||
sudo docker run debian_asan | ||
su non-root -c | ||
'bash "$0" "$1"' linux_thirdparty.bash ${{ matrix.thirdparty }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM debian:12-slim | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
gcc-12 \ | ||
file binutils libc-dev libgcc-12-dev \ | ||
make cmake pkg-config \ | ||
autoconf autopoint automake gettext texinfo \ | ||
git curl ca-certificates \ | ||
python3 tcl-dev bison flex re2c \ | ||
libcurl4-openssl-dev libssl-dev libexpat1-dev zlib1g-dev libicu-dev \ | ||
libncurses-dev libreadline-dev libpsl-dev libffi-dev libxml2-dev libsqlite3-dev \ | ||
# build_gcc | ||
libgmp-dev libmpfr-dev libmpc-dev \ | ||
# test_toxcore | ||
libsodium-dev \ | ||
# test_perl:cpan/Socket/t/getaddrinfo.t | ||
netbase | ||
|
||
COPY . /work/slimcc | ||
WORKDIR /work/slimcc | ||
|
||
RUN gcc-12 -O3 -flto=auto -march=native *.c -fsanitize=address -o slimcc_asan | ||
RUN apt-get -y autoremove gcc-12 && apt-get clean | ||
|
||
ENV ASAN_OPTIONS=detect_leaks=0 | ||
ENV CC=/work/slimcc/slimcc_asan | ||
|
||
RUN bash scripts/linux_thirdparty.bash install_libtool | ||
|
||
RUN useradd -m non-root -s /bin/bash && \ | ||
su non-root -c "git config --global advice.detachedHead false" && \ | ||
su non-root -c "git config --global init.defaultBranch init" && \ | ||
mv scripts/linux_thirdparty.bash /home/non-root | ||
|
||
WORKDIR /home/non-root |
Oops, something went wrong.