Skip to content

Commit 3f288c6

Browse files
committed
Convering pyfaasm to ctypes
1 parent 8152da7 commit 3f288c6

File tree

18 files changed

+369
-608
lines changed

18 files changed

+369
-608
lines changed

.github/workflows/build.yml

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

.github/workflows/tests.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
types: [opened, synchronize, reopened, ready_for_review]
9+
10+
jobs:
11+
formatting:
12+
if: github.event.pull_request.draft == false
13+
runs-on: ubuntu-20.04
14+
container:
15+
image: faasm/cpython:0.0.8
16+
defaults:
17+
run:
18+
working-directory: /code/faasm-cpython
19+
steps:
20+
- name: "Fetch ref"
21+
run: git fetch origin ${GITHUB_REF}:ci-branch
22+
- name: "Check out branch"
23+
run: git checkout --force ci-branch
24+
- name: "Install base requirements"
25+
run: pip3 install -r requirements.txt
26+
- name: "Install pyfaasm requirements"
27+
run: pip3 install -r pyfaasm/test_requirements.txt
28+
- name: "Python formatting check"
29+
run: ./bin/check_python.sh
30+
31+
jobs:
32+
build:
33+
if: github.event.pull_request.draft == false
34+
runs-on: ubuntu-20.04
35+
container:
36+
image: faasm/cpython:0.0.8
37+
defaults:
38+
run:
39+
working-directory: /code/faasm-cpython
40+
steps:
41+
- name: "Fetch ref"
42+
run: git fetch origin ${GITHUB_REF}:ci-branch
43+
- name: "Check out branch"
44+
run: git checkout --force ci-branch
45+
- name: "Install base requirements"
46+
run: pip3 install -r requirements.txt
47+
- name: "Install pyfaasm requirements"
48+
run: pip3 install -r pyfaasm/test_requirements.txt
49+
- name: "Install pyfaasm"
50+
run: inv pyfaasm.native
51+
- name: "Run pyfaasm tests"
52+
run: inv pyfaasm.test

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ RUN apt install -y \
44
libssl-dev \
55
ninja-build
66

7-
WORKDIR /code/faasm-cpython
7+
WORKDIR /tmp
88
COPY requirements.txt .
9+
COPY pyfaasm/test_requirements.txt .
910
RUN pip3 install -r requirements.txt
11+
RUN pip3 install -r test_requirements.txt
1012

1113
# Install build Python (careful with Docker cache here)
1214
WORKDIR /code/faasm-cpython

bin/check_python.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Check all files
6+
FILES_TO_CHECK=$(git ls-files -- "*.py")
7+
8+
# Run black
9+
python3 -m black --check ${FILES_TO_CHECK}
10+
11+
# Run flake8
12+
python3 -m flake8 ${FILES_TO_CHECK}

pyfaasm/core

95.2 MB
Binary file not shown.

0 commit comments

Comments
 (0)