Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Commit

Permalink
revert back to using apt-get install SFML on ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
Longwater1234 committed Jun 8, 2024
1 parent e2a913e commit 04af518
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ on:
branches: [ "master" ]

env:
# global build variables
# global build variables (this sfml_dir is requird only for Windows, Unix is auto)
SFML_DIR: "C:/SFML/SFML-2.6.1"
BUILD_DIR: ${{ github.workspace }}/build
SFML_WIN_ZIP: SFML-2.6.1-windows-vc17-64-bit.zip

jobs:
build:
Expand All @@ -32,7 +33,6 @@ jobs:
os: [ubuntu-latest, windows-latest]
build_type: [Release]
c_compiler: [gcc, cl]
sfml_dir: ["/var/sfml/SFML-2.6.1", "C:/SFML/SFML-2.6.1"]
include:
- os: windows-latest
c_compiler: cl
Expand All @@ -50,33 +50,24 @@ jobs:

steps:
- uses: actions/checkout@v4

# - name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
# id: strings
# shell: bash
# run: |
# echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"

- name: Set Up SFML on Ubuntu
- name: Download SFML for Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo mkdir -p '/var/sfml' && sudo curl -fsSL "https://www.sfml-dev.org/files/SFML-2.6.1-linux-gcc-64-bit.tar.gz" -o "/var/sfml/SFML-2.6.1-linux-gcc-64-bit.tar.gz";
sudo tar -xvf /var/sfml/SFML-2.6.1-linux-gcc-64-bit.tar.gz -C "/var/sfml/"
run: sudo apt-get install -y libsfml-dev

- name: Set Up SFML on Windows
- name: Download and setup SFML for Windows
if: matrix.os == 'windows-latest'
shell: cmd
run: |
mkdir "C:/SFML" && curl -fsSL "https://www.sfml-dev.org/files/SFML-2.6.1-windows-vc17-64-bit.zip" -o "C:/SFML/SFML-2.6.1-windows-vc17-64-bit.zip"
tar -xvf "C:/SFML/SFML-2.6.1-windows-vc17-64-bit.zip" -C "C:/SFML/"
mkdir "C:/SFML" && curl -fsSL "https://www.sfml-dev.org/files/${{ env.SFML_WIN_ZIP }}" -o "C:/SFML/${{ env.SFML_WIN_ZIP }}"
tar -xvf "C:/SFML/${{ env.SFML_WIN_ZIP }}" -C "C:/SFML/"
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B ${{ env.BUILD_DIR }}
-DSFML_DIR=${{matrix.sfml_dir}}
-DSFML_HOME=${{env.SFML_DIR}}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
Expand All @@ -90,4 +81,4 @@ jobs:
working-directory: ${{ env.BUILD_DIR }}
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --build-config ${{ matrix.build_type }}
run: ctest --build-config ${{ matrix.build_type }}

0 comments on commit 04af518

Please sign in to comment.