Skip to content

Commit

Permalink
Rename to .oci
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnks committed Oct 27, 2023
1 parent ef49ee2 commit 57cafac
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build the Fedora testing environment
run: ./mktree.docker build
run: ./mktree.oci build
working-directory: ./tests
- name: Run the test suite
run: ./mktree.docker check --interactive=false --log -j$(nproc)
run: ./mktree.oci check --interactive=false --log -j$(nproc)
working-directory: ./tests

env:
MKTREE_PODMAN: docker
8 changes: 4 additions & 4 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,18 @@ if (nproc GREATER 1)
endif()

# Set up mktree
set(MKTREE_BACKEND podman CACHE STRING "Mktree backend to use")
set(MKTREE_BACKEND oci CACHE STRING "Mktree backend to use")
set(DOCKERFILE ${CMAKE_CURRENT_SOURCE_DIR}/Dockerfile.${OS_NAME})
if (MKTREE_BACKEND STREQUAL podman)
if (MKTREE_BACKEND STREQUAL oci)
find_program(PODMAN podman)
find_program(DOCKER docker)
mark_as_advanced(PODMAN DOCKER)
if (PODMAN AND EXISTS ${DOCKERFILE})
set(MKTREE_NATIVE yes)
configure_file(${DOCKERFILE} Dockerfile COPYONLY)
add_custom_target(ci
COMMAND ./mktree.podman build
COMMAND ./mktree.podman check ${JOBS} $(TESTOPTS)
COMMAND ./mktree.oci build
COMMAND ./mktree.oci check --log ${JOBS} $(TESTOPTS)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
else()
Expand Down
1 change: 0 additions & 1 deletion tests/mktree.docker

This file was deleted.

13 changes: 2 additions & 11 deletions tests/mktree.podman → tests/mktree.oci
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
#!/bin/bash
#
# Podman-based mktree backend using OCI images.
#
# If a Dockerfile matching the host distribution is found, it is built and then
# combined with the local RPM build to produce the final image ("native" mode).
# Otherwise, the default Dockerfile is used and RPM is built as part of the
# image ("non-native" mode).
#
# This script can also be invoked directly from the source directory, in which
# case it performs a non-native build (useful for CI purposes). If invoked via
# the mktree.docker symlink, docker is used instead of podman.
# OCI-based mktree backend

PROGRAM=$(basename $0)
if [ "$PROGRAM" == "mktree" ]; then
Expand All @@ -19,7 +10,7 @@ if [ "$PROGRAM" == "mktree" ]; then
NATIVE=@MKTREE_NATIVE@
else
# Running from source directory
PODMAN=$(echo $PROGRAM | cut -d'.' -f2)
PODMAN=${MKTREE_PODMAN:-podman}
CONTEXT=..
NATIVE=no
fi
Expand Down

0 comments on commit 57cafac

Please sign in to comment.