File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ ARG USER=ci
44
55RUN apt-get update && apt-get install -y --no-install-recommends \
66 ca-certificates curl git \
7- build-essential gcc g++ \
7+ build-essential \
88 clang lld ninja-build sudo \
99 python3 python3-pip cmake \
1010 && rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change 1+ FROM debian:latest
2+
3+ ARG USER=ci
4+
5+ RUN apt-get update && apt-get install -y --no-install-recommends \
6+ ca-certificates curl git \
7+ build-essential gcc g++ \
8+ lld ninja-build sudo \
9+ python3 python3-pip cmake \
10+ && rm -rf /var/lib/apt/lists/*
11+
12+ RUN pip install conan --break-system-packages
13+
14+ RUN useradd -m ${USER} \
15+ && echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
16+
17+ WORKDIR /home/${USER}/workspace
Original file line number Diff line number Diff line change 88 name : Compile (${{ matrix.compiler }})
99 runs-on : ubuntu-latest
1010 container :
11- image : ghcr.io/hypercpu-project/hypercpu-builder:latest
11+ image : ghcr.io/hypercpu-project/hypercpu-builder-${{ matrix.compiler }} :latest
1212 options : --init
1313 permissions :
1414 contents : read
2727 fetch-depth : 0
2828
2929 - name : Install dependencies with Conan
30- run : |
31- if [ "${{ matrix.compiler }}" = "clang" ]; then
32- export CC=$(which clang)
33- export CXX=$(which clang++)
34- else
35- export CC=$(which gcc)
36- export CXX=$(which g++)
37- fi
38- sudo -u ci env CC=$CC CXX=$CXX conan profile detect
30+ run : sudo -u ci conan profile detect
3931
4032 - name : Fix permissions
4133 run : chown -R ci:ci "$GITHUB_WORKSPACE"
Original file line number Diff line number Diff line change @@ -24,12 +24,22 @@ jobs:
2424 - name : Set up Docker Buildx
2525 uses : docker/setup-buildx-action@v3
2626
27- - name : Build and push
27+ - name : Build and push clang image
2828 uses : docker/build-push-action@v6
2929 with :
3030 context : .
31- file : .github/Dockerfile
31+ file : .github/docker/clang/ Dockerfile
3232 push : true
33- tags : ghcr.io/hypercpu-project/hypercpu-builder:latest
33+ tags : ghcr.io/hypercpu-project/hypercpu-builder-clang:latest
34+ cache-from : type=gha
35+ cache-to : type=gha,mode=max
36+
37+ - name : Build and push gcc image
38+ uses : docker/build-push-action@v6
39+ with :
40+ context : .
41+ file : .github/docker/gcc/Dockerfile
42+ push : true
43+ tags : ghcr.io/hypercpu-project/hypercpu-builder-gcc:latest
3444 cache-from : type=gha
3545 cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments