Skip to content

Commit 9853d2b

Browse files
racerxdlumarcor
authored andcommitted
add 'apicula' workflow, dockerfile and test (#11)
1 parent 88cf0da commit 9853d2b

File tree

6 files changed

+179
-0
lines changed

6 files changed

+179
-0
lines changed

.github/workflows/apicula.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Authors:
2+
# Unai Martinez-Corral
3+
# Lucas Teske
4+
#
5+
# Copyright 2019-2021 Unai Martinez-Corral <[email protected]>
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
# SPDX-License-Identifier: Apache-2.0
20+
21+
name: 'apicula'
22+
23+
on:
24+
pull_request:
25+
push:
26+
schedule:
27+
- cron: '0 0 * * 5'
28+
workflow_dispatch:
29+
repository_dispatch:
30+
types: [ apicula ]
31+
32+
env:
33+
DOCKER_BUILDKIT: 1
34+
35+
jobs:
36+
37+
apicula:
38+
runs-on: ubuntu-latest
39+
steps:
40+
41+
- uses: actions/checkout@v2
42+
with:
43+
submodules: recursive
44+
45+
- run: echo "$(pwd)/.github/bin" >> $GITHUB_PATH
46+
47+
- run: dockerBuild pkg:apicula apicula pkg
48+
- run: dockerBuild apicula apicula
49+
50+
- run: dockerTestPkg apicula
51+
- run: dockerTest apicula
52+
53+
- name: Login to DockerHub
54+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
55+
uses: docker/login-action@v1
56+
with:
57+
username: ${{ secrets.DOCKER_USER }}
58+
password: ${{ secrets.DOCKER_PASS }}
59+
60+
- run: dockerPush pkg:apicula
61+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
62+
63+
- run: dockerPush apicula
64+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
65+

apicula.dockerfile

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# syntax=docker/dockerfile:experimental
2+
# Authors:
3+
# Unai Martinez-Corral
4+
# Lucas Teske
5+
#
6+
# Copyright 2019-2021 Unai Martinez-Corral <[email protected]>
7+
#
8+
# Licensed under the Apache License, Version 2.0 (the "License");
9+
# you may not use this file except in compliance with the License.
10+
# You may obtain a copy of the License at
11+
#
12+
# http://www.apache.org/licenses/LICENSE-2.0
13+
#
14+
# Unless required by applicable law or agreed to in writing, software
15+
# distributed under the License is distributed on an "AS IS" BASIS,
16+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
# See the License for the specific language governing permissions and
18+
# limitations under the License.
19+
#
20+
# SPDX-License-Identifier: Apache-2.0
21+
22+
FROM hdlc/build:build AS build
23+
24+
RUN apt-get update -qq \
25+
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends wget
26+
27+
RUN mkdir /opt/apicula \
28+
&& wget https://files.pythonhosted.org/packages/1a/d6/b3162f87ff114d639095fe7c0655080ee16caff9037d6629f738d8b28d92/Apycula-0.0.1a6.tar.gz \
29+
&& tar -xvf Apycula-0.0.1a6.tar.gz --strip-components=1 -C /opt/apicula \
30+
&& ls -lah /opt/apicula
31+
32+
#---
33+
34+
FROM scratch AS pkg
35+
COPY --from=build /opt/apicula /apicula
36+
37+
#---
38+
39+
FROM hdlc/build:base
40+
41+
RUN --mount=type=cache,from=build,src=/opt/apicula,target=/opt/apicula cd /opt/apicula \
42+
&& python3 setup.py install \
43+
&& rm -rf ~/.cache
44+

debian-buster/base.dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ RUN apt-get update -qq \
2424
ca-certificates \
2525
curl \
2626
python3 \
27+
python3-setuptools \
2728
&& apt-get autoclean && apt-get clean && apt-get -y autoremove \
2829
&& update-ca-certificates \
2930
&& rm -rf /var/lib/apt/lists/*

doc/tools.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,12 @@ z3:
254254
- 'formal:min'
255255
- 'formal'
256256
- 'formal:all'
257+
258+
#---
259+
260+
apicula:
261+
url: 'https://hdl.github.io/awesome/items/apicula'
262+
pkg:
263+
- 'apicula'
264+
use:
265+
- 'apicula'

test/apicula.pkg.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/sh
2+
3+
# Authors:
4+
# Unai Martinez-Corral
5+
# Lucas Teske
6+
#
7+
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
8+
#
9+
# Licensed under the Apache License, Version 2.0 (the "License");
10+
# you may not use this file except in compliance with the License.
11+
# You may obtain a copy of the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS,
17+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
# See the License for the specific language governing permissions and
19+
# limitations under the License.
20+
#
21+
# SPDX-License-Identifier: Apache-2.0
22+
23+
set -e
24+
25+
cd $(dirname "$0")
26+
27+
tree /
28+
29+
./_todo.sh

test/apicula.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env sh
2+
3+
# Authors:
4+
# Unai Martinez-Corral
5+
# Lucas Teske
6+
#
7+
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
8+
#
9+
# Licensed under the Apache License, Version 2.0 (the "License");
10+
# you may not use this file except in compliance with the License.
11+
# You may obtain a copy of the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS,
17+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
# See the License for the specific language governing permissions and
19+
# limitations under the License.
20+
#
21+
# SPDX-License-Identifier: Apache-2.0
22+
23+
set -e
24+
25+
cd $(dirname "$0")
26+
27+
./_env.sh
28+
29+
./smoke-tests/apicula.sh
30+
31+
./_todo.sh

0 commit comments

Comments
 (0)