Skip to content

FIX: updating checkout github action #11

FIX: updating checkout github action

FIX: updating checkout github action #11

name: build-latest-container
on:
pull_request:
branches: [master]
types: [opened, reopened, synchronize, closed]
paths:
- '**.cu'
- '**.cuh'
- '**.c'
- '**.h'
- '**.cpp'
- '**.hpp'
- '**.cmake'
- CMakeLists.txt
- Dockerfile.prod
env:
REGISTRY: ghcr.io
jobs:
build-latest-container:
runs-on: ubuntu-latest
container:
image: ghcr.io/miguelcarcamov/gpuvmem:base
options: --user root
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Compile GPUVMEM
env:
BUILD_DIR: build
CONFIG: Release
run: |
cmake . -B $BUILD_DIR -DCMAKE_BUILD_TYPE=$CONFIG
cd $BUILD_DIR
cmake --build . --target install --verbose -j `nproc`
cd ..
pip3 install -r requirements.txt
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
push: true # Will only build if this is not here
tags: ${{ env.REGISTRY }}/${{ github.repository }}:latest