Skip to content

acmcsufoss/gh-actions-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions Workshop

This repository contains a cross-platform C++ "hello world" program designed to demonstrate the uses of GitHub actions.

Objectives

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

Getting Started

Forking this Repo

  1. 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.

Obtaining dependencies (optional)

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!

Ubuntu or Debian based Linux:

sudo apt install build-essential clang-format

MacOS

brew install clang clang-format

Windows

winget install llvm.llvm

Building and Running (optional)

Linux/MacOS

./build.sh
./hello <your name>

Windows

. .\build.ps1
.\hello <your name>

Workshop Agenda

  1. Write GitHub action that checks for compiler errors and code formatting, and watch this fail
  2. Format code locally and push (the checks should pass now)
  3. Expand action to run on multiple platforms

If you get lost

See the completed workflows below:

About

GitHub Actions workshop demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published