Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Follow-up: Fix Tetris CI by moving to Ubuntu SFML build#2

Merged
clouds1729 merged 1 commit into
mainfrom
codex/github-mention-add-cmake-build,-.gitignore,-and-polish-read
May 17, 2026
Merged

Follow-up: Fix Tetris CI by moving to Ubuntu SFML build#2
clouds1729 merged 1 commit into
mainfrom
codex/github-mention-add-cmake-build,-.gitignore,-and-polish-read

Conversation

@clouds1729

Copy link
Copy Markdown
Owner

Motivation

  • Repair the broken/flattened workflow and CMake files so CI can run reliably.
  • The Windows workflow was failing because CMake could not find SFML, so prefer a simple Ubuntu CI that installs libsfml-dev from apt to avoid brittle vcpkg/platform-specific issues.
  • Keep developer setup simple and avoid changing game logic or the tetris executable name.

Description

  • Rewrote and reformatted .github/workflows/cmake-windows.yml into readable YAML and switched the job to runs-on: ubuntu-latest that installs cmake, g++, and libsfml-dev via apt.
  • Rewrote CMakeLists.txt as multi-line CMake and updated SFML discovery/linking to use distro-style package names with find_package(SFML 2.5 REQUIRED COMPONENTS graphics window system) and target_link_libraries(tetris PRIVATE sfml-graphics sfml-window sfml-system).
  • Updated README.md build commands to use Release-mode configure/build (cmake -S . -B build -DCMAKE_BUILD_TYPE=Release and cmake --build build --config Release) and added a short CI note describing the Ubuntu approach.
  • Preserved main.cpp, kept the executable name tetris, and retained the post-build image copy in CMake to place images/ beside the executable.

Testing

  • Ran git status --short to verify only the intended files changed, which succeeded.
  • Ran CMake configure locally with cmake -S . -B build -DCMAKE_BUILD_TYPE=Release, which failed in this container because SFML development files/config are not installed here (expected in this environment).
  • Created the commit with git add/git commit, which succeeded; there are no repository unit tests to run.

Codex Task

@clouds1729 clouds1729 merged commit 9b41568 into main May 17, 2026
1 of 2 checks passed
@clouds1729

Copy link
Copy Markdown
Owner Author

@codex fix the remaining failing Tetris GitHub Actions check.

The PR now has one passing check:

  • CMake Build / build

But GitHub is still running and failing:

  • CMake on Windows / build

Please inspect the entire .github/workflows directory and remove or disable the old Windows workflow completely.

Goal:

  • Only one CI workflow should run for this repo.
  • The only active CI should be the Ubuntu SFML CMake build that installs libsfml-dev and passes.
  • No workflow named "CMake on Windows" should remain active.

Tasks:

  1. Search all files under .github/workflows for "CMake on Windows", "windows-latest", "vcpkg", "Visual Studio", and "windows-msvc".
  2. Delete the old Windows workflow file if it is separate.
  3. If the old workflow file is the same file, replace it completely with the Ubuntu workflow.
  4. Rename the workflow file from cmake-windows.yml to something neutral like cmake.yml if helpful.
  5. Make sure the final workflow name is exactly:

name: CMake Build

  1. The final workflow should use only:

runs-on: ubuntu-latest

and install:

sudo apt-get update
sudo apt-get install -y cmake g++ libsfml-dev

  1. Do not leave any Windows/vcpkg/preset-based workflow active.
  2. Do not change game logic.
  3. Summarize which workflow files were deleted/renamed/changed.

After this, the PR should only show the Ubuntu CMake Build check.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • Removed the legacy Windows CI workflow by deleting .github/workflows/cmake-single-platform.yml, which eliminates the old CMake on Windows workflow path from the repo. .github/workflows/cmake.ymlL1-L25
  • Renamed .github/workflows/cmake-windows.yml to .github/workflows/cmake.yml so the workflow filename is neutral while keeping a single active workflow. .github/workflows/cmake.ymlL1-L25
  • Confirmed the only remaining workflow is exactly name: CMake Build, runs on ubuntu-latest, and installs cmake, g++, and libsfml-dev via apt. .github/workflows/cmake.ymlL1-L25

Testing

  • rg -n "CMake on Windows|windows-latest|vcpkg|Visual Studio|windows-msvc" .github/workflows || true
  • rg --files .github/workflows
  • git status --short
  • git add -A && git commit -m "ci: remove old Windows workflow and keep single Ubuntu build"
  • git show --name-status --oneline -1

View task →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant