diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml index d8a2d30..137c49b 100644 --- a/.github/workflows/Linux.yml +++ b/.github/workflows/Linux.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 @@ -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/docker-gpr@v1.3.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + image-name: sewas-${{ github.sha }}-${{ github.run_id }} + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3510bc7 --- /dev/null +++ b/Dockerfile @@ -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