Skip to content

Create cmake-single-platform.yml #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
024b1ce
Create cmake-single-platform.yml
Aug 4, 2024
7a0c3dd
Update cmake-single-platform.yml
Aug 4, 2024
8d04c9e
Update cmake-single-platform.yml
Aug 4, 2024
c581e44
Update cmake-single-platform.yml
Aug 4, 2024
65a3961
Update cmake-single-platform.yml
Aug 4, 2024
3c0c1c2
Update cmake-single-platform.yml
Aug 4, 2024
0285280
Update cmake-single-platform.yml
Aug 5, 2024
7846ca8
Update cmake-single-platform.yml
Aug 5, 2024
234e85e
Update cmake-single-platform.yml
Aug 5, 2024
6c44b9f
Update cmake-single-platform.yml
Aug 5, 2024
1c4574e
Update cmake-single-platform.yml
Aug 5, 2024
86d736a
Update cmake-single-platform.yml
Aug 5, 2024
4e5ee1b
Update cmake-single-platform.yml
Aug 5, 2024
0c22dd7
Update cmake-single-platform.yml
Aug 5, 2024
bed76b8
Update cmake-single-platform.yml
Aug 5, 2024
dc17231
Update cmake-single-platform.yml
Aug 5, 2024
5b14e75
Update cmake-single-platform.yml
Aug 5, 2024
0277362
Merge branch 'master' into twh2898-patch-1
Aug 5, 2024
d3aa715
Merge branch 'master' into twh2898-patch-1
Aug 5, 2024
3a0e518
Update cmake-single-platform.yml
Aug 6, 2024
a9681ea
Update cmake-single-platform.yml
Aug 6, 2024
318153f
Update cmake-single-platform.yml
Aug 6, 2024
d38ad0a
Update cmake-single-platform.yml
Aug 6, 2024
9ef2d17
Update cmake-single-platform.yml
Aug 6, 2024
495c6c3
Update cmake-single-platform.yml
Aug 6, 2024
3bc9d31
Update cmake-single-platform.yml
Aug 6, 2024
6485af8
Update cmake-single-platform.yml
Aug 6, 2024
1feed8a
Update cmake-single-platform.yml
Aug 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/cmake-single-platform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: CMake on a single platform

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install OpenGL
run: >
sudo apt-get update &&
sudo apt-get install -y freeglut3-dev libglew-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libsfml-dev doxygen

- 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 ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Build docs
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target docs

- name: List docs
run: ls ${{github.workspace}}/build/docs

- uses: actions/upload-artifact@v4
with:
name: docs
path: ${{github.workspace}}/build/docs/html

# - name: Test
# working-directory: ${{github.workspace}}/build
# # Execute tests defined by the CMake configuration.
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure

deploy_pages:
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
with:
artifact_name: docs
Loading