Skip to content

Commit 6e66ac1

Browse files
committed
Update workflow
1 parent 9166f7c commit 6e66ac1

11 files changed

Lines changed: 138 additions & 27 deletions
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM archlinux:latest
2+
3+
ARG USER=ci
4+
5+
RUN pacman -Syu --noconfirm \
6+
ca-certificates curl git \
7+
clang make unzip \ # Equivalent to build-essential, clang, etc.
8+
ninja sudo python3 cmake \
9+
&& rm -rf /var/cache/pacman/pkg/
10+
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
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM fedora:latest
2+
3+
ARG USER=ci
4+
5+
RUN dnf update -y && dnf -y install \
6+
ca-certificates curl git \
7+
make g++ unzip \
8+
clang lld ninja-build sudo \
9+
python3 python3-pip cmake \
10+
&& rm -rf /var/cache/dnf/*
11+
12+
13+
RUN pip install conan --break-system-packages
14+
15+
RUN useradd -m ${USER} \
16+
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
17+
18+
WORKDIR /home/${USER}/workspace
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM ubuntu: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 unzip \
8+
clang 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

.github/docker/gcc/Dockerfile-arch

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM archlinux:latest
2+
3+
ARG USER=ci
4+
5+
RUN pacman -Syu --noconfirm \
6+
ca-certificates curl git \
7+
gcc make unzip \ # Equivalent to build-essential, clang, etc.
8+
ninja sudo python3 cmake \
9+
&& rm -rf /var/cache/pacman/pkg/
10+
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
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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 unzip \
8+
gcc 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
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM fedora:latest
2+
3+
ARG USER=ci
4+
5+
RUN dnf update -y && dnf -y install \
6+
ca-certificates curl git \
7+
make g++ unzip \
8+
gcc lld ninja-build sudo \
9+
python3 python3-pip cmake \
10+
&& rm -rf /var/cache/dnf/*
11+
12+
13+
RUN pip install conan --break-system-packages
14+
15+
RUN useradd -m ${USER} \
16+
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
17+
18+
WORKDIR /home/${USER}/workspace
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM ubuntu: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 unzip \
8+
gcc 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

.github/workflows/mainline-compile.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on:
55

66
jobs:
77
testing:
8-
name: Compile (${{ matrix.compiler }})
8+
name: Compile (${{ matrix.compiler }} on ${{ matrix.distribution }})
99
runs-on: ubuntu-latest
1010
container:
11-
image: ghcr.io/hypercpu-project/hypercpu-builder-${{ matrix.compiler }}:latest
11+
image: ghcr.io/hypercpu-project/hypercpu-builder-${{ matrix.compiler }}-${{ matrix.distribution }}:latest
1212
options: --init
1313
permissions:
1414
contents: read
@@ -18,6 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
compiler: [gcc, clang]
21+
distribution: [debian, ubuntu, fedora, arch]
2122

2223
steps:
2324
- name: Checkout code
@@ -39,10 +40,7 @@ jobs:
3940
sudo -u ci cmake --build build/Release -j$(nproc)
4041
sudo -u ci cmake --build build/Release --target package
4142
42-
- name: Upload package tarball
43-
uses: actions/upload-artifact@v4
44-
with:
45-
name: hcpu-tarballs-${{ matrix.compiler }}
46-
path: |
47-
build/Release/*.tar.gz
48-
if-no-files-found: error
43+
- name: Run all tests
44+
run: |
45+
sudo -u ci build/Release/tests/Integration/integration-tests
46+
sudo -u ci build/Release/tests/Modular/modular-tests

.github/workflows/mainline-prepare.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ jobs:
1010
contents: read
1111
packages: write
1212

13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
compiler: [ gcc, clang ]
17+
distribution: [ ubuntu, debian, fedora, arch ]
18+
1319
steps:
1420
- name: Checkout
1521
uses: actions/checkout@v5
@@ -28,18 +34,8 @@ jobs:
2834
uses: docker/build-push-action@v6
2935
with:
3036
context: .
31-
file: .github/docker/clang/Dockerfile
32-
push: true
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
37+
file: .github/docker/${{ matrix.compiler }}/Dockerfile-${{ matrix.distribution }}
4238
push: true
43-
tags: ghcr.io/hypercpu-project/hypercpu-builder-gcc:latest
39+
tags: ghcr.io/hypercpu-project/hypercpu-builder-${{ matrix.compiler }}-${{ matrix.distribution }}:latest
4440
cache-from: type=gha
4541
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)