Dev #412
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: r-type workflow | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- dev | |
- server | |
- client | |
pull_request: | |
env: | |
EXECUTABLES: r-type_client, r-type_server | |
jobs: | |
check_program_compilation: | |
name: Check compilation | |
runs-on: ubuntu-latest | |
container: | |
image: mathieubrl/rtype | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Cache vcpkg | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/vcpkg/ | |
key: ${{ hashFiles('vcpkg.json') }} | |
- name: Setup vcpkg | |
run: | | |
if [ ! -d "vcpkg" ]; then | |
git clone https://github.com/microsoft/vcpkg.git | |
./vcpkg/bootstrap-vcpkg.sh | |
fi | |
./vcpkg/vcpkg install | |
- name: Compilation | |
run: | | |
./release.sh | |
- name: Verify if files exist and are executable | |
run: | | |
for exe in $(echo $EXECUTABLES | tr ',' ' '); | |
do | |
if [ ! -x $exe ]; then exit 1; fi; | |
done; | |
exit 0; |