Skip to content

Commit 533f77a

Browse files
issue #4 migration to Github actions complete (#18)
* complete migration to github actions * fixing workflow syntax
1 parent fa3c14e commit 533f77a

File tree

18 files changed

+32487
-298
lines changed

18 files changed

+32487
-298
lines changed
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ghcr.io/opencyphal/c_cpp container build and publish.
1+
name: ghcr.io/opencyphal/texer container build and publish.
22

33
on:
44
release:
@@ -9,8 +9,8 @@ on:
99

1010
env:
1111
ORG_NAMESPACE: opencyphal
12-
IMAGE_NAME: c_cpp
13-
LATEST_TAG: ubuntu-20.04
12+
IMAGE_NAME: texer
13+
IMAGE_VERSION_PREFIX: tev
1414

1515
jobs:
1616

@@ -23,14 +23,13 @@ jobs:
2323

2424
- name: dryrun-build
2525
if: ${{ github.event_name == 'pull_request' }}
26-
run: docker build ./c_cpp
26+
run: docker build ./${{ env.IMAGE_NAME }}
2727
- name: build-and-push
28-
if: ${{ github.event_name == 'release' && contains(github.ref, '20.04-c_cpp') }}
28+
if: ${{ github.event_name == 'release' && startsWith(github.ref, env.IMAGE_VERSION_PREFIX) }}
2929
uses: macbre/push-to-ghcr@master
3030
with:
3131
context: ./${{ env.IMAGE_NAME }}
3232
dockerfile: ./${{ env.IMAGE_NAME }}/Dockerfile
3333
image_name: ${{ env.ORG_NAMESPACE }}/${{ env.IMAGE_NAME }}
3434
github_token: ${{ secrets.GITHUB_TOKEN }}
35-
image_tag: ${{ env.LATEST_TAG }}
3635
repository: ghcr.io

.github/workflows/toolshed.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: ghcr.io/opencyphal/toolshed container build and publish.
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
pull_request:
8+
branches: [ "main" ]
9+
10+
env:
11+
ORG_NAMESPACE: opencyphal
12+
IMAGE_NAME: toolshed
13+
IMAGE_VERSION_PREFIX: txv
14+
15+
jobs:
16+
17+
build_and_publish:
18+
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
24+
- name: dryrun-build
25+
if: ${{ github.event_name == 'pull_request' }}
26+
run: docker build ./${{ env.IMAGE_NAME }}
27+
- name: build-and-push
28+
if: ${{ github.event_name == 'release' && startsWith(github.ref, env.IMAGE_VERSION_PREFIX) }}
29+
uses: macbre/push-to-ghcr@master
30+
with:
31+
context: ./${{ env.IMAGE_NAME }}
32+
dockerfile: ./${{ env.IMAGE_NAME }}/Dockerfile
33+
image_name: ${{ env.ORG_NAMESPACE }}/${{ env.IMAGE_NAME }}
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
repository: ghcr.io

.github/workflows/toxic.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: ghcr.io/opencyphal/toxic container build and publish.
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
pull_request:
8+
branches: [ "main" ]
9+
10+
env:
11+
ORG_NAMESPACE: opencyphal
12+
IMAGE_NAME: toxic
13+
IMAGE_VERSION_PREFIX: txv
14+
15+
jobs:
16+
17+
build_and_publish:
18+
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
24+
- name: dryrun-build
25+
if: ${{ github.event_name == 'pull_request' }}
26+
run: docker build ./${{ env.IMAGE_NAME }}
27+
- name: build-and-push
28+
if: ${{ github.event_name == 'release' && startsWith(github.ref, env.IMAGE_VERSION_PREFIX) }}
29+
uses: macbre/push-to-ghcr@master
30+
with:
31+
context: ./${{ env.IMAGE_NAME }}
32+
dockerfile: ./${{ env.IMAGE_NAME }}/Dockerfile
33+
image_name: ${{ env.ORG_NAMESPACE }}/${{ env.IMAGE_NAME }}
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
repository: ghcr.io

README.md

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,76 @@ organization on Github](https://github.com/orgs/OpenCyphal/packages) and are use
88
by the build automation for OpenCyphal projects. You can use these same
99
containers to get consistent build results in your local development environment.
1010

11-
### opencyphal/c_cpp
11+
To allow hosting of multiple container builds from a single repo each toolchain container
12+
is assigned a prefix. For every release event in this repo the workflow triggered is based
13+
on that prefix in the release tag. For example, by creating a release with the tag `tsv18.4.1-alpha`
14+
the release workflow for the `toolshed` container will be triggered.
1215

13-
[![ghcr.io/opencyphal/c_cpp container build and publish.](https://github.com/OpenCyphal/docker_toolchains/actions/workflows/c_cpp.yml/badge.svg)](https://github.com/OpenCyphal/docker_toolchains/actions/workflows/c_cpp.yml)
16+
### opencyphal/toolshed:tsv
1417

15-
The [Open Cyphal c_cpp
16-
container](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/c_cpp)
17-
is based on various Ubuntu releases with the container tag being the latest build
18-
of our c_cpp container based on a given release. This container provides the
19-
necessary compilers and utilities to build and run OpenCyphal C or C++ projects
18+
The [Open Cyphal toolshed
19+
container](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toolshed)
20+
is based on Ubuntu and provides the necessary compilers and utilities to build and run OpenCyphal C or C++ projects
2021
like [libcanard](https://github.com/OpenCyphal/libcanard) and
2122
[Nunavut](https://github.com/OpenCyphal/nunavut).
2223

2324
#### Supported Versions
2425

2526
| tag | Python | Gcc | Clang | Cmake | Other Utilities |
26-
|----------|--------|-----|-------|-------|-------|
27-
| [ubuntu-20.04](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/c_cpp/69896735?tag=ubuntu-20.04) | 3.10 | 9.3.0 | 10.0.0 | 3.16.3 | <ul><li>qemu</li><li>can-utils</li><li>sonar-scanner</li></ul> |
27+
|----------|--------|-----|-------|-------|-----------------|
28+
| [tsv20.4.1](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toolshed/70028521?tag=tsv20.4.1) | 3.10 | 9.3.0 | 10.0.0 | 3.16.3 | <ul><li>qemu</li><li>can-utils</li><li>sonar-scanner</li></ul> |
2829

2930
You can use this in your workflow yaml like this:
3031

3132
```none
3233
jobs:
3334
my-job:
3435
runs-on: ubuntu-latest
35-
container: ghcr.io/opencyphal/c_cpp:ubuntu-20.04
36+
container: ghcr.io/opencyphal/toolshed:tsv20.4.1
3637
```
3738

3839

39-
### opencyphal/texer
40+
### opencyphal/texer:tev
4041

41-
[LaTeX](https://www.latex-project.org/) toolchain. Will be migrated to github actions soon, stay tuned!
42+
The [Open Cyphal texer
43+
container](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/texer)
44+
is based on Ubuntu and provides the necessary compilers and utilities to author and publish OpenCyphal [LaTeX](https://www.latex-project.org/) documents like [the specification](https://github.com/OpenCyphal/specification).
4245

43-
### opencyphal/toxic
46+
#### Supported Versions
47+
48+
| tag | Python | Tex Live | git | Other Utilities |
49+
|----------|--------|----------|-----|-----------------|
50+
| [tev20.4.1](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/texer/70028521?tag=tsv20.4.1) | 3.11 | 2019 | 2.25.1 | <ul><li>python pygments</li><li>lyx</li><li>inkscape</li></ul> |
51+
52+
You can use this in your workflow yaml like this:
53+
54+
```none
55+
jobs:
56+
my-job:
57+
runs-on: ubuntu-latest
58+
container: ghcr.io/opencyphal/texer:tev20.4.1
59+
```
60+
61+
62+
63+
### opencyphal/toxic:txv
4464

45-
Python toolchain. Will be migrated to github actions soon. Stay tuned!
65+
66+
The [Open Cyphal toxic
67+
container](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toxic)
68+
is based on Ubuntu and provides all modern Python3 distributions, pip, tox, and nox. It can be used to develop, test, build, and release Python projects like [nunavut](https://github.com/OpenCyphal/nunavut), [pydsdl](https://github.com/OpenCyphal/pydsdl), and [pycyphal](https://github.com/OpenCyphal/pycyphal).
69+
70+
#### Supported Versions
71+
72+
| tag | Base Python | Python Versions | Tox | Nox | pip | Other Utilities |
73+
|----------|-------------|-----------------|-----|-----|-----|-----------------|
74+
| [txv20.4.1](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toxic/70031935?tag=txv20.4.1) | 3.8 | 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12 | 4.4.5 | (not available) | 20.0.2 | <ul><li>sonar-scanner</li></ul> |
75+
76+
You can use this in your workflow yaml like this:
77+
78+
```none
79+
jobs:
80+
my-job:
81+
runs-on: ubuntu-latest
82+
container: ghcr.io/opencyphal/toxic:txv20.4.1
83+
```

nodethon/Dockerfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

nodethon/README.md

Lines changed: 0 additions & 72 deletions
This file was deleted.

nodethon/provision.sh

Lines changed: 0 additions & 65 deletions
This file was deleted.

texer/Dockerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#
2-
# Builds the c_cpp/ubuntu-20.04 toolchain container.
2+
# Builds the toolshed/ubuntu-20.04 toolchain container.
33
#
44
FROM ubuntu:20.04
55

6+
LABEL org.opencontainers.image.description "Provides a consistent build and test environment for authoring, continuous-integration, and publication of OpenCyphal LaTeX documents."
7+
68
VOLUME /repo
79

810
WORKDIR /repo
@@ -32,16 +34,19 @@ RUN apt-get -y install git
3234
RUN add-apt-repository -y ppa:deadsnakes/ppa
3335
RUN apt-get update
3436

35-
RUN apt-get -y install python3.7
36-
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 999
37-
RUN apt-get -y install python3-pip
38-
RUN python3 -m pip install --upgrade pip
37+
RUN apt-get -y install python3.11
38+
RUN apt-get -y install python3.11-distutils
39+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 999
40+
41+
COPY get-pip.py /
42+
RUN python3 /get-pip.py
43+
RUN rm -f /get-pip.py
3944

4045
RUN python3 -m pip install pygments
4146

4247
# install Powershell
4348
RUN apt-get -y install --no-install-recommends wget apt-transport-https
44-
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb && \
49+
RUN wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb && \
4550
dpkg -i packages-microsoft-prod.deb
4651
RUN apt-get update && \
4752
apt-get install -y powershell

0 commit comments

Comments
 (0)