Fixing github workflow #22
This file contains 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: Main | |
on: | |
push: | |
paths-ignore: | |
- '.gitignore' | |
- '*.md' | |
jobs: | |
lint: | |
name: π§Ή Lint / π C++ | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run clang-format style check | |
uses: jidicula/[email protected] | |
with: | |
clang-format-version: '15' | |
exclude-regex: 'extern' | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: ['Debug', 'Release'] | |
config: | |
- { name: 'π macOS Clang', os: macos-latest } | |
- { name: 'π§ Linux GCC', os: ubuntu-latest } | |
- { name: 'πͺ Windows MSVC', os: windows-latest } | |
name: π Build / ${{ matrix.config.name }} (${{ matrix.build_type }}) | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Dependencies (macOS) | |
if: matrix.config.os == 'macos-latest' | |
run: brew install ccache ninja | |
- name: Install Dependencies (Linux) | |
if: matrix.config.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ccache ninja-build | |
- name: Install Dependencies (Windows) | |
if: matrix.config.os == 'windows-latest' | |
run: | | |
choco upgrade ccache ninja | |
- name: Setup MSVC (Windows) | |
if: matrix.config.os == 'windows-latest' | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
max-size: '10G' | |
key: ${{ matrix.config.os }}-${{ matrix.build_type }} | |
- name: Prepare OpenCV | |
run: | | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 605C66F00D6C9793 | |
- name: Setup OpenCV | |
uses: Dovyski/[email protected] | |
- name: Configure | |
run: > | |
mkdir GDExtension-build | |
cmake | |
-B GDExtension-build | |
-G "Ninja" | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
--install-prefix ${{ github.workspace }}/install-${{ matrix.build_type }} | |
. | |
- name: Build | |
run: cmake --build GDExtension-build | |
- name: Install | |
run: cmake --install GDExtension-build | |
- name: Upload artifact (Debug) | |
if: matrix.build_type == 'Debug' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }}-Debug | |
path: | | |
${{ github.workspace }}/install-${{ matrix.build_type }}/* | |
- name: Upload artifact (Release) | |
if: matrix.build_type == 'Release' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }}-Release | |
path: | | |
${{ github.workspace }}/install-${{ matrix.build_type }}/* |