Skip to content

Commit

Permalink
Fix act for local GitHub Action testing
Browse files Browse the repository at this point in the history
  • Loading branch information
0xg0nz0 committed Jan 15, 2024
1 parent cd00d1d commit abf72c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
- name: Configure
uses: threeal/[email protected]
with:
generator: Ninja
c-compiler: clang
cxx-compiler: clang++
options: CMAKE_TOOLCHAIN_FILE='/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake'
Expand Down
12 changes: 5 additions & 7 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@

This is a collection of tips for developers of `iggy-cpp-client`. The initial code is being built with the latest Visual Studio Code and its C++ dev container, under `.devcontainer`. If you are using CLion, XCode or other toolchains it may not have been tested, so please report issues and we will fix them. We are also currently using [vcpkg](https://vcpkg.io) in [manifest mode](https://learn.microsoft.com/en-us/vcpkg/users/manifests) for dependency management. The appropriate packages are downloaded and compiled locally as part of the CMake build, but if you add a new dependency extra steps are required to update the manifest and CMake configuration.

## HOWTO: Test GitHub Actions locally
## Tested configurations

Our continuous integration uses GitHub Actions, and sometimes it's more convenient to first test it. The VS Code container includes the [act](https://github.com/nektos/act) extension, and you can use it to do a smoke test of the CI actions before you push to GitHub. Note that the default platform Docker image does not work, and there is no working image at this time for Ubuntu 22.04, so you should force a mapping and then run just one matrix version for 20.04 like this:
CI runs on ubuntu-20.04 and ubuntu-22.04, and the dev containers have been tested on both x64 and arm64 (MacOS 14.x, using latest VS Code and Docker Desktop).

```
act -P ubuntu-20.04=catthehacker/ubuntu:full-20.04 --matrix=os:ubuntu-20.04 --no-pull
```
## HOWTO: Test GitHub Actions locally

The Docker image required is very large, and you probably want to pull it once and then specify `--no-pull` like shown above:
Our continuous integration uses GitHub Actions, and sometimes it's more convenient to first test it. The VS Code container includes the [act](https://github.com/nektos/act) extension, and you can use it to do a smoke test of the CI actions before you push to GitHub:

```
docker pull catthehacker/ubuntu:full-20.04
act -P ubuntu-20.04=catthehacker/ubuntu:full-20.04 -P ubuntu-22.04=catthehacker/ubuntu:full-22.04
```

Once it's working well locally, you can push and the CI job will automatically run the full matrix for you.
Expand Down

0 comments on commit abf72c4

Please sign in to comment.