Skip to content

Commit a4c1217

Browse files
authored
ci: Set up CI for devcontainer (#3)
* ci: Set up CI for devcontainer * Add dockerfile
1 parent a2e04a7 commit a4c1217

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

Diff for: .github/workflows/ci.yml

+18-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,25 @@ on:
88
branches: [main]
99

1010
jobs:
11+
build_devcontainer:
12+
name: Build (Devcontainer)
13+
run-on: ubuntu-latest
14+
env:
15+
TAG: cpython-devcontainer:1.0.0-${{ github.run_id }}
16+
steps:
17+
- name: Checkout Push to Registry action
18+
uses: actions/checkout@v4
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
- name: Build Dockerfile
22+
uses: docker/build-push-action@v5
23+
with:
24+
context: ./devcontainer
25+
load: true
26+
tags: ${{ env.TAG }}
27+
1128
build_autoconf:
12-
name: Build and test
29+
name: Build and test (Autoconf)
1330
strategy:
1431
fail-fast: false
1532
matrix:

Diff for: devcontainer/Dockerfile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM docker.io/library/fedora:40
2+
3+
ENV CC=clang
4+
5+
ENV WASI_SDK_VERSION=24
6+
ENV WASI_SDK_PATH=/opt/wasi-sdk
7+
8+
ENV WASMTIME_HOME=/opt/wasmtime
9+
ENV WASMTIME_VERSION=22.0.0
10+
ENV WASMTIME_CPU_ARCH=x86_64
11+
12+
RUN dnf -y --nodocs --setopt=install_weak_deps=False install /usr/bin/{blurb,clang,curl,git,ln,tar,xz} 'dnf-command(builddep)' && \
13+
dnf -y --nodocs --setopt=install_weak_deps=False builddep python3 && \
14+
dnf -y clean all
15+
16+
RUN mkdir ${WASI_SDK_PATH} && \
17+
curl --location https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz | \
18+
tar --strip-components 1 --directory ${WASI_SDK_PATH} --extract --gunzip
19+
20+
RUN mkdir --parents ${WASMTIME_HOME} && \
21+
curl --location "https://github.com/bytecodealliance/wasmtime/releases/download/v${WASMTIME_VERSION}/wasmtime-v${WASMTIME_VERSION}-${WASMTIME_CPU_ARCH}-linux.tar.xz" | \
22+
xz --decompress | \
23+
tar --strip-components 1 --directory ${WASMTIME_HOME} -x && \
24+
ln -s ${WASMTIME_HOME}/wasmtime /usr/local/bin
25+
26+

0 commit comments

Comments
 (0)