This repository contains a cross-platform C++ "hello world" program designed to demonstrate the uses of GitHub actions.
We will write a GitHub action that will do the following:
- Ensure that the project builds
- Ensure source code is formatted (it's currently not)
- Check the above conditions on both Unix and Windows
- Fork this repo and then clone your fork locally. This is critical - you're not working from a fork the actions you write won't be able to run.
If you have issues with this step, it's OK - this workshop is not about running or developing this program locally.
This project requires a C++ compiler and clang-format - if you already have
both of these, skip to the next section!
sudo apt install build-essential clang-format
brew install clang clang-format
winget install llvm.llvm
./build.sh
./hello <your name>
. .\build.ps1
.\hello <your name>
- Write GitHub action that checks for compiler errors and code formatting, and watch this fail
- Format code locally and push (the checks should pass now)
- Expand action to run on multiple platforms
See the completed workflows below: