Skip to content

Commit 14b7509

Browse files
committed
Add Apicula for Gowin FPGA Devices
1 parent 3ffe14f commit 14b7509

File tree

4 files changed

+163
-0
lines changed

4 files changed

+163
-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: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
FROM hdlc/build:build AS build
22+
23+
RUN apt-get update -qq \
24+
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends python3-setuptools python3-pip
25+
26+
RUN mkdir /tmp/apicula \
27+
&& cd /tmp/apicula \
28+
&& pip3 install apycula --target /tmp/apicula
29+
30+
#---
31+
32+
FROM scratch AS pkg
33+
COPY --from=build /tmp/apicula /apicula
34+
35+
#---
36+
37+
FROM hdlc/build:base
38+
RUN apt-get update -qq \
39+
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends python3-setuptools python3-pip \
40+
&& pip3 install apycula

test/apicula.pkg.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
# Authors:
4+
# Unai Martinez-Corral
5+
#
6+
# Copyright 2020-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+
set -e
23+
24+
cd $(dirname "$0")
25+
26+
./_tree.sh
27+
28+
./_todo.sh

test/apicula.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env sh
2+
3+
# Authors:
4+
# Unai Martinez-Corral
5+
#
6+
# Copyright 2020-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+
set -e
23+
24+
cd $(dirname "$0")
25+
26+
./_env.sh
27+
28+
./smoke-tests/apicula.sh
29+
30+
./_todo.sh

0 commit comments

Comments
 (0)