Initial commit for VFX Platform 2024 containers #401
Workflow file for this run
This file contains 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: Test Build Docker Images | |
on: | |
push: | |
branches: | |
- '*' | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: | |
- '*' | |
paths-ignore: | |
- '**.md' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_CLI_EXPERIMENTAL: enabled | |
DOCKER_BUILDKIT: '1' | |
strategy: | |
matrix: | |
group: [img-common-1] # Extra groups come from the include next | |
include: | |
- group: img-common-2 | |
type: IMAGE | |
name: common | |
version: 2-clang10 | |
test: common | |
- group: img-common-3 | |
type: IMAGE | |
name: common | |
version: 3-clang14 | |
test: common | |
- group: img-common-4 | |
type: IMAGE | |
name: common | |
version: 4-clang16 | |
test: common | |
- group: pkg-base-2023 | |
type: PACKAGE | |
name: base1 | |
common_version: 3-clang14 | |
version: 2023 | |
test: "" | |
- group: pkg-base-2024 | |
type: PACKAGE | |
name: base1 | |
common_version: 4-clang16 | |
version: 2024 | |
test: "" | |
- group: img-base-2024 | |
type: IMAGE | |
name: base | |
common_version: 4-clang16 | |
version: 2024 | |
test: base | |
- group: img-vfx1-2024 | |
type: IMAGE | |
name: vfx1 | |
common_version: 4-clang16 | |
version: 2024 | |
test: openvdb | |
- group: img-vfx2-2024 | |
type: IMAGE | |
name: vfx2 | |
common_version: 4-clang16 | |
version: 2024 | |
test: "" | |
- group: img-vfx3-2024 | |
type: IMAGE | |
name: vfx3 | |
common_version: 4-clang16 | |
version: 2024 | |
test: "" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Activate Docker buildx | |
run: | | |
mkdir -p ~/.docker/cli-plugins | |
curl --location https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64 -o ~/.docker/cli-plugins/docker-buildx | |
chmod a+x ~/.docker/cli-plugins/docker-buildx | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: 'pipenv' | |
- name: Install pipenv | |
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python | |
- name: Install aswfdocker and dependencies with pipenv | |
run: pipenv install | |
- name: Free up disk space | |
run: | | |
sudo apt-get remove -y '^llvm-.*' | |
sudo apt-get remove -y 'php.*' | |
sudo apt-get remove -y '^cpp.*' | |
sudo apt-get remove -y '^g\+\+.*' | |
sudo apt-get remove -y '^clang.*' | |
sudo apt-get remove -y '^gfortran.*' | |
sudo apt-get remove -y google-chrome-stable firefox powershell mono-devel monodoc-http | |
sudo apt-get autoremove -y | |
sudo apt-get clean | |
rm -rf /usr/share/dotnet/ | |
df -h | |
- run: | | |
set -ex | |
pipenv run aswfdocker \ | |
--repo-uri $GITHUB_REPOSITORY \ | |
--source-branch $GITHUB_REF \ | |
--verbose \ | |
build \ | |
--ci-image-type IMAGE \ | |
--group common \ | |
--version ${{ matrix.common_version }} | |
name: Optionally build local ci-common Docker Image for downstream images | |
if: ${{ matrix.name != 'common' }} | |
- run: | | |
set -ex | |
pipenv run aswfdocker \ | |
--repo-uri $GITHUB_REPOSITORY \ | |
--source-branch $GITHUB_REF \ | |
--verbose \ | |
build \ | |
--ci-image-type ${{ matrix.type }} \ | |
--group ${{ matrix.name }} \ | |
--version ${{ matrix.version }} \ | |
--push NO | |
name: Build Docker Images | |
- run: | | |
set -ex | |
export DOCKER_ORG=`pipenv run aswfdocker --repo-uri $GITHUB_REPOSITORY --source-branch $GITHUB_REF getdockerorg` | |
test_script=scripts/tests/${{ matrix.version }}/test_${{ matrix.test }}.sh | |
if [ -f $test_script ] | |
then | |
echo "Going to run ${test_script}" | |
echo "docker run -i --rm ${DOCKER_ORG}/ci-${{ matrix.test }}:${{ matrix.version }} run < ${test_script}" | |
docker run -i --rm \ | |
-v $(Pipeline.Workspace)/cache/ci-image_${{ matrix.name }}_${{ matrix.version }}/ccache:/tmp/ccache \ | |
${DOCKER_ORG}/ci-${{ matrix.test }}:${{ matrix.version }} run < ${test_script} | |
else | |
echo "No test script found $test_script" | |
fi | |
name: Run test script ${{ matrix.version }}/test_${{ matrix.test }}.sh to check Docker image | |
if: ${{ matrix.test != '' }} |