Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable publishing Docker-based build artifacts #19

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
34 changes: 33 additions & 1 deletion .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
Expand All @@ -28,6 +28,38 @@ jobs:
run: mkdir build && cd build && cmake .. -DBUILD_TESTING=ON -DCOLLECT_STATS=ON -DSEWAS_DISTRIBUTED=ON -DSEWAS_WITH_PARSEC=ON -DVERBOSE=ON && cd -
- name: build
run: cmake --build build --config Release

- name: prepare artifacts
run: |
mkdir -p public/sewas
cp build/sewas public/sewas
cp -r data public/sewas
cp -r thirdparty/install public

- uses: actions/upload-artifact@master
with:
name: sewas-artifacts
path: public

- name: test
run: cd build && ctest -C Release --output-on-failure -V

package:
runs-on: ubuntu-latest
needs: build
name: Docker Build, Tag, Push

steps:
- name: Checkout
uses: actions/checkout@v1
- name: Download built artifact
uses: actions/download-artifact@master
with:
name: sewas-artifacts
path: public
- name: Build, Tag, Push
uses: mattdavis0351/actions/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
image-name: sewas-${{ github.sha }}-${{ github.run_id }}

12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM ubuntu:18.04

RUN DEBIAN_FRONTEND=noninteractive apt-get -y update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential libboost-program-options-dev openmpi-bin openmpi-common

# Install thirdparty libraries
COPY ./public/install /usr

# Install sewas artifacts
COPY ./public/sewas /home/sewas
RUN chmod u+rwx /home/sewas/sewas