Skip to content

Workflow file for this run

name: Main workflow file
on:
push:
paths:
- "*CMakeLists.txt"
- "3rdparty/**"
- "Makefile"
- "docker/**"
- "src/**"
- "tests/**"
- "toolchains/**"
- ".github/**"
jobs:
Source-code-checks:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- run: pip install cpplint cmake-format
- run: make check
cppcheck:
name: cppcheck-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: cppcheck
uses: shmocz/cppcheck-action@main
with:
script_path: ./scripts/cppcheck.sh
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: mkdir -p ~/image-cache
- id: image-cache
uses: actions/cache@v3
with:
path: ~/image-cache
key: image-cache-${{ runner.os }}
- if: steps.image-cache.outputs.cache-hit != 'true'
run: |
docker-compose build builder
docker save -o ~/image-cache/builder.tar shmocz/ra2yrcpp
- if: steps.image-cache.outputs.cache-hit == 'true'
run: docker load -i ~/image-cache/builder.tar
build-with-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- id: image-cache
uses: actions/cache@v3
with:
path: ~/image-cache
key: image-cache-${{ runner.os }}
- if: steps.image-cache.outputs.cache-hit == 'true'
run: |
docker load -i ~/image-cache/builder.tar
- name: Build with Docker container
run: |
mkdir -p cbuild wine-dir
docker-compose run -e CMAKE_TOOLCHAIN_FILE=toolchains/mingw-w64-i686-docker.cmake -T --rm builder make build_cpp
- name: Run tests
run: CMAKE_TOOLCHAIN_FILE=toolchains/mingw-w64-i686-docker.cmake make docker_test
- name: Compress files
run: |
mkdir -p release
cp cbuild/mingw-w64-i686-docker-Release/pkg/bin/* release
cd release && zip -r ra2yrcpp.zip . && mv ra2yrcpp.zip ~/.
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: test-release
files: |
~/ra2yrcpp.zip