Skip to content

Commit

Permalink
[brief] Update the CI scripts.
Browse files Browse the repository at this point in the history
[detailed]
- Merges all the build scripts into a single build system that tests
  everything.
- Adds a release script to generate binaries.
  • Loading branch information
marovira committed Nov 11, 2024
1 parent ec62bf8 commit bff301e
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 329 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build

on:
push:
branches: [ master ]

paths-ignore:
- '**.md'
- 'LICENSE'
tags-ignore:
- "*.*.*"
pull_request:
branches: [ master ]
paths-ignore:
- '**.md'
- '**.rst'
- 'LICENSE'
- '**/release-*.yml'
tags-ignore:
- "*.*.*"
workflow_dispatch:

jobs:
build:
name: ${{ matrix.config.os }}-${{ matrix.build }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {os: "windows-latest", cxx: "msvc", cc: "msvc", preset: "msvc"}
- {os: "ubuntu-24.04", cxx: "g++-14", cc: "gcc-14", preset: "linux"}
- {os: "macos-latest", cxx: "clang++", cc: "clang", preset: "macOS"}
build: ["Debug", "Release"]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build Lua
shell: bash
env:
BUILD_TYPE: ${{ matrix.build }}
CONFIG_TYPE: ${{ matrix.config.preset }}
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: |
cmake --preset=$CONFIG_TYPE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$HOME/lua
cd ./build
if [[ "$OSTYPE" == "msys" ]]; then
cmake --build . --config $BUILD_TYPE
else
make
fi
- name: Install Lua
shell: bash
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: |
cmake --install ./build
sudo make install
- name: Test App
shell: bash
working-directory: ./test
env:
BUILD_TYPE: ${{ matrix.config.build_type }}
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: |
cmake --preset=$CONFIG_TYPE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PREFIX_PATH=$HOME
cd ./build
if [[ "$OSTYPE" == "msys" ]]; then
cmake --build . --config $BUILD_TYPE
else
make
fi
87 changes: 0 additions & 87 deletions .github/workflows/clang.yml

This file was deleted.

82 changes: 0 additions & 82 deletions .github/workflows/gcc.yml

This file was deleted.

77 changes: 0 additions & 77 deletions .github/workflows/msvc.yml

This file was deleted.

Loading

0 comments on commit bff301e

Please sign in to comment.