Enable C++ and Golang builds in the Devcontainer + DinD stub #76
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build-project: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3.5.3 | |
- name: Setup cmake | |
uses: jwlawson/actions-setup-cmake@v1.13 | |
with: | |
# We need recent version with support for WORKING_DIRECTORY in add_test() | |
cmake-version: '3.27.6' | |
- name: Run CMake | |
uses: threeal/cmake-action@v1.3.0 | |
with: | |
run-build: true | |
run-test: true | |
test-args: "--output-on-failure" | |
build-site: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: "true" | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build in the dev container image | |
uses: devcontainers/ci@v0.3 | |
with: | |
imageName: ghcr.io/testcontainers/testcontainers-native-builder | |
cacheFrom: ghcr.io/testcontainers/testcontainers-native-builder | |
push: never | |
runCmd: | | |
mkdocs build | |
env: | | |
FULL_BUILD=true | |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} |