Skip to content

hello(world): initial action and CMakeLists #12

hello(world): initial action and CMakeLists

hello(world): initial action and CMakeLists #12

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
REGISTRY: ghcr.io
jobs:
set-env:
runs-on: [ubuntu-22.04]
outputs:
CI_IMAGE : ${{ steps.common.outputs.CI_IMAGE }}
steps:
- name: Export common variables.
id : common
run : |
echo "CI_IMAGE=${{ env.REGISTRY }}/${{ github.repository }}/kokkos-utils:latest" >> $GITHUB_OUTPUT
build-image:
needs: [set-env]
runs-on: [ubuntu-22.04]
container:
image: docker:latest
permissions:
packages: write
steps:
- name: Checkout code.
uses: actions/checkout@v4
- name: Log in to Docker registry.
run : |
docker login -u ${{ github.actor}} -p ${{ secrets.GITHUB_TOKEN }} ${{ env.REGISTRY }}
- name: Build Docker image.
run : |
docker buildx build \
--pull \
--push \
--file dockerfile \
--platform linux/amd64 \
--tag ${{ needs.set-env.outputs.CI_IMAGE }} \
--cache-from ${{ needs.set-env.outputs.CI_IMAGE }} \
--build-arg BUILDKIT_INLINE_CACHE=1 \
.
build-library:
needs: [set-env, build-image]
runs-on: [ubuntu-22.04]
container:
image: ${{ needs.set-env.outputs.CI_IMAGE }}
steps:
- name: Checkout code.
uses: actions/checkout@v4
- name: Configure and build.
run : |
cmake -S . -B build
cmake --build build