From f0f921320411b413a01c506da52717ca72c7f71b Mon Sep 17 00:00:00 2001 From: ADM228 <91823517+ADM228@users.noreply.github.com> Date: Tue, 23 Jul 2024 00:36:56 +0300 Subject: [PATCH] Example CI --- .github/workflows/emulator.yml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/emulator.yml b/.github/workflows/emulator.yml index 1d0c5a3..d623156 100644 --- a/.github/workflows/emulator.yml +++ b/.github/workflows/emulator.yml @@ -27,4 +27,33 @@ jobs: - name: Build shell: bash - run: cmake --build build --target t85apu_emu --config Release \ No newline at end of file + run: cmake --build build --target t85apu_emu --config Release + + examples: + runs-on: ${{ matrix.platform.os }} + name: Build example for ${{ matrix.example.name }} on ${{ matrix.platform.name }} + + strategy: + fail-fast: false + matrix: + platform: + - { name: Windows VS2019, os: windows-2019 } + - { name: Windows VS2022, os: windows-2022 } + - { name: Linux GCC, os: ubuntu-latest } + - { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } + - { name: MacOS XCode, os: macos-latest } + example: + - { name: C, target: example_c } + - { name: C++, target: example_cpp } + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Configure + shell: bash + run: cmake -S . -B build -DCMAKE_INSTALL_PREFIX=install ${{matrix.platform.flags}} -DBUILD_SHARED_LIBS=FALSE + + - name: Build + shell: bash + run: cmake --build build --target ${{ matrix.example.target }} --config Release \ No newline at end of file