Skip to content

Update README

Update README #203

Workflow file for this run

# check spelling, codestyle
name: GitHub CI
# run only on main branch. This avoids duplicated actions on PRs
on:
pull_request:
push:
tags:
- "*"
branches:
- main
workflow_dispatch:
inputs:
jobs:
style:
name: Pre-commit Check
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.FILETRANSFER_SERVER_TOKEN }}
- name: Build and run pre-commit hooks via docker
run: |
docker build -f docker/Dockerfile --target precommit --tag filetransfer-precommit .
docker run filetransfer-precommit
env:
DOCKER_BUILDKIT: '1'
build:
name: Compile and Test
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
conan_config: linux_x86_64_Release
- os: windows-2019
conan_config: windows_x86_64_Release
steps:
- uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.FILETRANSFER_SERVER_TOKEN }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: actions/cache@v3
name: Pip cache
with:
path: ${{ startsWith(runner.os, 'Linux') && '~/.cache/pip' || '~\AppData\Local\pip\Cache' }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements_dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dev dependencies
run: |
pip install -U pip wheel
pip install -r requirements_dev.txt
- name: Run Conan and build with CMake
run: |
conan install -of build --build missing --profile:host=./conan/${{ matrix.conan_config }} --profile:build=./conan/${{ matrix.conan_config }} ./conan
cmake -B build . -DCMAKE_TOOLCHAIN_FILE='build/conan_toolchain.cmake' -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel
# - name: Test
# run: |
# ./build/bin/server
docker-build:
name: Build and publish Docker container
needs: [style, build] # run only for successful build
runs-on: ubuntu-22.04
env:
REGISTRY: ghcr.io
IMAGE_OWNER: ansys-internal
IMAGE_NAME_BASE: tools-filetransfer
steps:
- uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.FILETRANSFER_SERVER_TOKEN }}
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build full image and export to GHCR
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
push: ${{ github.ref == 'refs/heads/main' }}
target: app
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME_BASE }}:latest