Skip to content

Commit

Permalink
Merge pull request #849 from Daft-Freak/split-examples-2
Browse files Browse the repository at this point in the history
Split examples v2
  • Loading branch information
Daft-Freak authored Aug 14, 2024
2 parents 574545f + 720d081 commit 7f4f872
Show file tree
Hide file tree
Showing 240 changed files with 177 additions and 9,433 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/Emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Checkout Examples
uses: actions/checkout@v3
with:
repository: 32blit/32blit-examples
path: 32blit-examples

- name: Install deps
run: |
sudo apt update && sudo apt install doxygen graphviz python3-setuptools
Expand Down Expand Up @@ -50,7 +56,7 @@ jobs:
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: emcmake cmake $GITHUB_WORKSPACE -D32BLIT_DIR=$GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS_RELEASE="-O2 -DNDEBUG"
run: emcmake cmake $GITHUB_WORKSPACE/32blit-examples -D32BLIT_DIR=$GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS_RELEASE="-O2 -DNDEBUG"

# Problem matching
- uses: ammaraskar/gcc-problem-matcher@master
Expand All @@ -65,7 +71,7 @@ jobs:
- name: Prepare Site
run: |
mkdir -p site/examples
cp ../build/examples/*/*.{js,wasm} site/examples
cp ../build/*/*.{js,wasm} site/examples
- name: Upload Artifact
uses: actions/upload-artifact@v3
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/Visual Studio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Checkout Examples
uses: actions/checkout@v3
with:
repository: 32blit/32blit-examples
path: examples

- name: Install deps
shell: bash
run: |
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
name: PicoSystem
cache-key: picosystem
release-suffix: PicoSystem
cmake-args: -D32BLIT_DIR=$GITHUB_WORKSPACE -DPICO_SDK_PATH=$GITHUB_WORKSPACE/pico-sdk -DPICO_BOARD=pimoroni_picosystem -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake-args: -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/pico.toolchain -DPICO_SDK_PATH=$GITHUB_WORKSPACE/pico-sdk -DPICO_BOARD=pimoroni_picosystem -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
apt-packages: ccache gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib python3-setuptools

- os: ubuntu-20.04
Expand Down Expand Up @@ -76,6 +76,12 @@ jobs:
- name: Checkout 32Blit SDK
uses: actions/checkout@v3

- name: Checkout Examples
uses: actions/checkout@v3
with:
repository: 32blit/32blit-examples
path: examples

# pico sdk/extras for some builds
- name: Checkout Pico SDK
if: matrix.pico-sdk
Expand Down Expand Up @@ -138,7 +144,8 @@ jobs:
run: ci/install_sdl_mingw.sh

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
run: |
cmake -E make_directory ${{runner.workspace}}/build
- name: Set Tag Variable
if: github.event_name == 'release'
Expand Down Expand Up @@ -166,19 +173,11 @@ jobs:
cmake --build . --config $BUILD_TYPE -j 2
ccache --show-stats || true
#- name: Test
# working-directory: ${{runner.workspace}}/build
# shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C $BUILD_TYPE

- name: Prepare Artifact
if: github.event_name != 'release'
working-directory: ${{runner.workspace}}/build
shell: bash
run: |
cmake --build . --config $BUILD_TYPE --target install
cmake --build $RUNNER_WORKSPACE/build --config $BUILD_TYPE --target install
- name: Upload Artifact
if: github.event_name != 'release'
Expand Down
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ else()
endif()

find_package (32BLIT CONFIG REQUIRED PATHS .)
add_subdirectory(examples)
add_subdirectory(utilities)

add_subdirectory(launcher-shared)

Expand All @@ -26,6 +26,11 @@ if(NOT 32BLIT_PICO)
add_subdirectory(launcher)
endif()

# if the examples are there, build them too
if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/examples/CMakeLists.txt)
add_subdirectory(examples)
endif()

# include dist files in install
install(DIRECTORY
${CMAKE_CURRENT_LIST_DIR}/dist/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The `32blit-stm32` directory contains the STM32 HAL for 32blit, compatible with

## Examples / Projects

The `examples` directory contains example projects, these can be built into both SDL or STM32 binaries and cover a range of techniques from simple concepts to complete games.
The [32blit-examples](https://github.com/32blit/32blit-examples) repository contains example projects, these can be built into both SDL or STM32 binaries and cover a range of techniques from simple concepts to complete games.

Refer to the OS/platform specific documentation files in the `docs/` folder for instructions on how to compile and run these examples.

Expand Down
13 changes: 0 additions & 13 deletions assets/README.md

This file was deleted.

Binary file removed assets/gadgetoid_raycaster.png
Binary file not shown.
144 changes: 0 additions & 144 deletions assets/platformer.tmx

This file was deleted.

4 changes: 0 additions & 4 deletions assets/platformer.tsx

This file was deleted.

Binary file removed assets/s4m_ur4i-dingbads.png
Binary file not shown.
Binary file removed assets/s4m_ur4i-pirate-characters.png
Binary file not shown.
Binary file removed assets/s4m_ur4i-pirate-tilemap.png
Binary file not shown.
Binary file removed assets/s4m_ur4i-platformer.png
Binary file not shown.
Binary file removed assets/s4m_ur4i-space-shooter-backdrop-palette.png
Binary file not shown.
Binary file removed assets/s4m_ur4i-space-shooter-backdrop.png
Binary file not shown.
Binary file removed assets/s4m_ur4i-space-shooter-ships.png
Binary file not shown.
Binary file removed assets/s4m_ur4i-top-down-shooter.png
Binary file not shown.
Loading

0 comments on commit 7f4f872

Please sign in to comment.