Skip to content

Commit

Permalink
workflows: add sdl
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Nov 21, 2023
1 parent be47590 commit a760dd7
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
sudo apt-get -y update
sudo apt install xorg-dev
# for GLFW
- name: configure glfw
run: cmake -S . -Bbuild
working-directory: ./thirdparty/glfw
Expand All @@ -32,6 +33,20 @@ jobs:
run: |
cp -f ./thirdparty/glfw/build/src/libglfw3.a ./lib/linux/x64
# for SDL2
- name: configure sdl
run: cmake -S . -Bbuild
working-directory: ./thirdparty/SDL

- name: make sdl
run: make -j 4
working-directory: ./thirdparty/SDL/build

- name: copy sdl to lib
run: |
cp -f ./thirdparty/SDL/build//libSDL2.a ./lib/linux/x64
# for cimgui
- name: configure cimgui
run: cmake -Bbuild
working-directory: ./lib
Expand Down Expand Up @@ -61,6 +76,7 @@ jobs:
steps:
- uses: actions/checkout@main

# glfw
- name: configure glfw for x64
run: cmake -S . -Bbuild -DCMAKE_OSX_ARCHITECTURES=x86_64
working-directory: ./thirdparty/glfw
Expand Down Expand Up @@ -89,6 +105,36 @@ jobs:
run: |
cp -f ./thirdparty/glfw/build/src/libglfw3.a ./lib/macos/arm64
# sdl
- name: configure sdl for x64
run: cmake -S . -Bbuild -DCMAKE_OSX_ARCHITECTURES=x86_64
working-directory: ./thirdparty/SDL

- name: make sdl x84
run: make -j 4
working-directory: ./thirdparty/SDL/build

- name: copy sdl to lib
run: |
cp -f ./thirdparty/SDL/build/src/libSDL2.a ./lib/macos/x64
- name: clean sdl
run: cmake --build ./build --target clean
working-directory: ./thirdparty/SDL

- name: configure sdl for arm64
run: cmake -S . -Bbuild -DCMAKE_OSX_ARCHITECTURES=arm64
working-directory: ./thirdparty/SDL

- name: make sdl arm64
run: make -j 4
working-directory: ./thirdparty/SDL/build

- name: copy sdl to lib
run: |
cp -f ./thirdparty/SDL/build/src/libSDL2.a ./lib/macos/arm64
# cimgui
- name: configure cimgui for x64
run: cmake -Bbuild -DCMAKE_OSX_ARCHITECTURES=x86_64
working-directory: ./lib
Expand Down Expand Up @@ -151,6 +197,7 @@ jobs:
cmake:p
ninja:p
# glfw
- name: configure glfw
run: cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release
working-directory: ./thirdparty/glfw
Expand All @@ -162,6 +209,19 @@ jobs:
- name: copy glfw to lib
run: cp -f ./thirdparty/glfw/build/src/libglfw3.a ./lib/windows/x64

# sdl
- name: configure sdl
run: cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release
working-directory: ./thirdparty/SDL

- name: make sdl
run: cmake --build build -j 4
working-directory: ./thirdparty/SDL

- name: copy glfw to lib
run: cp -f ./thirdparty/glfw/build/libSDL2.a ./lib/windows/x64

# cimgui
- name: configure cimgui
run: cmake -G Ninja -B build
working-directory: .\lib
Expand Down

0 comments on commit a760dd7

Please sign in to comment.