mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
ci: make easier the debugging of the docker-alpine-musl-gcc
job (#23399)
This commit is contained in:
parent
ca6e3a38ce
commit
63db71b650
5 changed files with 58 additions and 6 deletions
52
.github/workflows/Dockerfile.ci_alpine_local
vendored
Normal file
52
.github/workflows/Dockerfile.ci_alpine_local
vendored
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
#######################################################################################
|
||||||
|
## The goal of this file, is to provide an easy and reproducible way to check *locally*
|
||||||
|
## the CI job `docker-alpine-musl-gcc`
|
||||||
|
## Building the docker image:
|
||||||
|
## docker build -t ci_alpine_local - < .github/workflows/Dockerfile.ci_alpine_local
|
||||||
|
## Running the docker image, after building it:
|
||||||
|
## docker run --rm -it -v .:/opt/vlang -w /opt/vlang ci_alpine_local
|
||||||
|
## Once it is running, inside the container you can:
|
||||||
|
## make && v -e 'println(2+2)'
|
||||||
|
## ... then do whatever you need to reproduce the CI test failure.
|
||||||
|
## Note: after you are finished, and exit the container, run `make` again, otherwise
|
||||||
|
## you will be using V (and potentially V tools) that were compiled with musl.
|
||||||
|
#######################################################################################
|
||||||
|
FROM thevlang/vlang:alpine-build
|
||||||
|
|
||||||
|
LABEL maintainer="spytheman <spytheman@bulsynt.org>"
|
||||||
|
|
||||||
|
WORKDIR /opt/vlang
|
||||||
|
|
||||||
|
ENV PATH /opt/vlang:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
|
## install development packages
|
||||||
|
RUN apk --no-cache add \
|
||||||
|
musl-dev libc-dev libc6-compat gcompat \
|
||||||
|
libunwind-dev libunwind-static \
|
||||||
|
gc gc-dev \
|
||||||
|
binutils diffutils elfutils \
|
||||||
|
strace gdb \
|
||||||
|
pcre bash fzf fzf-vim tmux less file colordiff \
|
||||||
|
vim vim-editorconfig \
|
||||||
|
nano nano-syntax \
|
||||||
|
micro
|
||||||
|
|
||||||
|
RUN git config --global --add safe.directory /opt/vlang &&\
|
||||||
|
git config --global --add safe.directory /opt/vlang/vc &&\
|
||||||
|
git config --global --add safe.directory /opt/vlang/thirdparty/tcc &&\
|
||||||
|
find /usr/share/nano/ -iname "*.nanorc" -exec echo include {} \; >> ~/.nanorc &&\
|
||||||
|
micro -plugin install detectindent &&\
|
||||||
|
micro -plugin install editorconfig &&\
|
||||||
|
micro -plugin install monokai-dark &&\
|
||||||
|
micro -plugin install quickfix &&\
|
||||||
|
micro -plugin install runit &&\
|
||||||
|
micro -plugin install cheat &&\
|
||||||
|
micro -plugin install jump &&\
|
||||||
|
true
|
||||||
|
|
||||||
|
## setup runtime environment for v and bash:
|
||||||
|
ENV VTMP /tmp/v
|
||||||
|
ENV VMODULES /tmp/vmodules
|
||||||
|
ENV VFLAGS "-d dynamic_boehm"
|
||||||
|
|
||||||
|
CMD ["bash"]
|
6
.github/workflows/docker_ci.yml
vendored
6
.github/workflows/docker_ci.yml
vendored
|
@ -24,7 +24,7 @@ env:
|
||||||
V_CI_MUSL: 1
|
V_CI_MUSL: 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
alpine-docker-musl-gcc:
|
docker-alpine-musl-gcc:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 241
|
timeout-minutes: 241
|
||||||
container:
|
container:
|
||||||
|
@ -45,7 +45,7 @@ jobs:
|
||||||
echo "C Compiler:"
|
echo "C Compiler:"
|
||||||
gcc --version
|
gcc --version
|
||||||
- name: Add dependencies
|
- name: Add dependencies
|
||||||
run: apk add libc6-compat
|
run: apk add libc6-compat gcompat gc gc-dev binutils diffutils elfutils
|
||||||
- name: Build V
|
- name: Build V
|
||||||
run: CC=gcc make
|
run: CC=gcc make
|
||||||
- name: All code is formatted
|
- name: All code is formatted
|
||||||
|
@ -53,7 +53,7 @@ jobs:
|
||||||
- name: Run only essential tests
|
- name: Run only essential tests
|
||||||
run: VTEST_JUST_ESSENTIAL=1 ./v test-self
|
run: VTEST_JUST_ESSENTIAL=1 ./v test-self
|
||||||
|
|
||||||
ubuntu-docker-musl:
|
docker-ubuntu-musl:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 121
|
timeout-minutes: 121
|
||||||
container:
|
container:
|
||||||
|
|
2
.github/workflows/tools_ci.yml
vendored
2
.github/workflows/tools_ci.yml
vendored
|
@ -101,7 +101,7 @@ jobs:
|
||||||
if: ${{ matrix.cc == 'msvc' }}
|
if: ${{ matrix.cc == 'msvc' }}
|
||||||
run: ./v -W -cstrict test-self cmd
|
run: ./v -W -cstrict test-self cmd
|
||||||
|
|
||||||
ubuntu-docker-musl:
|
tools-docker-ubuntu-musl:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 121
|
timeout-minutes: 121
|
||||||
container:
|
container:
|
||||||
|
|
|
@ -278,7 +278,7 @@ pub fn new_test_session(_vargs string, will_compile bool) TestSession {
|
||||||
$if !macos {
|
$if !macos {
|
||||||
skip_files << 'examples/macos_tray/tray.v'
|
skip_files << 'examples/macos_tray/tray.v'
|
||||||
}
|
}
|
||||||
if github_job == 'ubuntu-docker-musl' {
|
if github_job == 'docker-ubuntu-musl' {
|
||||||
skip_files << 'vlib/net/openssl/openssl_compiles_test.c.v'
|
skip_files << 'vlib/net/openssl/openssl_compiles_test.c.v'
|
||||||
skip_files << 'vlib/crypto/ecdsa/ecdsa_test.v'
|
skip_files << 'vlib/crypto/ecdsa/ecdsa_test.v'
|
||||||
skip_files << 'vlib/x/ttf/ttf_test.v'
|
skip_files << 'vlib/x/ttf/ttf_test.v'
|
||||||
|
|
|
@ -9,7 +9,7 @@ const is_verbose = os.getenv('VTEST_SHOW_CMD') != ''
|
||||||
// TODO: some logic copy pasted from valgrind_test.v and compiler_test.v, move to a module
|
// TODO: some logic copy pasted from valgrind_test.v and compiler_test.v, move to a module
|
||||||
fn test_golang() {
|
fn test_golang() {
|
||||||
// this was failing on ubuntu-docker-musl, skip it for now
|
// this was failing on ubuntu-docker-musl, skip it for now
|
||||||
if github_job == 'ubuntu-docker-musl' {
|
if github_job in ['docker-ubuntu-musl', 'tools-docker-ubuntu-musl'] {
|
||||||
eprintln('Skipping Go tests')
|
eprintln('Skipping Go tests')
|
||||||
exit(0)
|
exit(0)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue