File tree Expand file tree Collapse file tree 6 files changed +95
-72
lines changed
Expand file tree Collapse file tree 6 files changed +95
-72
lines changed Original file line number Diff line number Diff line change 1+ name : Build
2+
3+ on :
4+ push :
5+ branches : [master]
6+ pull_request :
7+ branches : [master]
8+
9+ jobs :
10+ build :
11+ if : github.event.pull_request.draft == false
12+ runs-on : ubuntu-20.04
13+ steps :
14+ - name : " Get the latest code"
15+ uses : actions/checkout@v2
16+ - name : " Submodules"
17+ run : " git submodule update --init --recursive"
18+ - name : " Install requirements"
19+ run : " pip3 install -r requirements.txt"
20+ - name : " Run Black"
21+ run : " python3 -m black --check $(git ls-files '*.py')"
22+ - name : " Set up QEMU"
23+ uses : docker/setup-qemu-action@v1
24+ - name : " Set up Docker Buildx"
25+ uses : docker/setup-buildx-action@v1
26+ - name : " Build the sysroot container"
27+ id : docker_build
28+ uses : docker/build-push-action@v2
29+ with :
30+ push : false
31+ context : .
32+ file : docker/cpython.dockerfile
33+
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*'
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-20.04
11+ steps :
12+ - name : " Get the code"
13+ uses : actions/checkout@v2
14+ - name : " Submodules"
15+ run : " git submodule update --init --recursive"
16+ - name : " Get tag version"
17+ run : echo ::set-env name=TAG_VERSION::${GITHUB_REF#refs/*/}
18+ - name : " Print tag version"
19+ run : echo ${{ env.TAG_VERSION }}
20+ - name : " Set up QEMU"
21+ uses : docker/setup-qemu-action@v1
22+ - name : " Set up Docker Buildx"
23+ uses : docker/setup-buildx-action@v1
24+ - name : " Log in to DockerHub"
25+ uses : docker/login-action@v1
26+ with :
27+ username : ${{ secrets.DOCKER_USERNAME }}
28+ password : ${{ secrets.DOCKER_PASSWORD }}
29+ - name : " Build and push sysroot container"
30+ id : docker_build
31+ uses : docker/build-push-action@v2
32+ with :
33+ push : true
34+ file : docker/cpython.dockerfile
35+ context : .
36+ tags : faasm/cpython:${{ env.TAG_VERSION }}
Original file line number Diff line number Diff line change 11FROM faasm/sysroot:0.0.7
22
33RUN apt install -y \
4- libssl-dev
4+ libssl-dev \
5+ ninja-build
56
6- WORKDIR cpython
7+ WORKDIR /code/faasm- cpython
78COPY requirements.txt .
89RUN pip3 install -r requirements.txt
910
11+ # Install build Python (careful with Docker cache here)
12+ COPY bin/install_build_python.sh bin/install_build_python.sh
13+ RUN ./bin/install_build_python.sh
1014
15+ # Add the rest of the code
1116COPY . .
1217
13- # Install build Python
14- RUN ./bin/install_build_python.sh
18+ # Build CPython
19+ RUN inv cpython
1520
16- # Install crossenv
21+ # Set up crossenv
1722RUN ./bin/crossenv_setup.sh
1823
1924# Build mxnet
Original file line number Diff line number Diff line change 33from . import (
44 container ,
55 cpython ,
6+ git ,
67 libs ,
78 mxnet ,
8- ffi ,
99)
1010
1111ns = Collection (
1212 container ,
1313 cpython ,
14+ git ,
1415 libs ,
1516 mxnet ,
16- ffi ,
1717)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ from invoke import task
2+
3+ from faasmtools .env import get_version , PROJ_ROOT
4+ from faasmtools .git import tag_project
5+
6+
7+ @task
8+ def tag (ctx ):
9+ """
10+ Creates git tag from the current tree
11+ """
12+ version = get_version ()
13+ tag_name = "v{}" .format (version )
14+ tag_project (tag_name , PROJ_ROOT )
You can’t perform that action at this time.
0 commit comments