Forcing complete build #252
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: Full build - Multi-Platform Docker Build with Caching | |
env: | |
REGISTRY_IMAGE: penthertz/rfswift | |
CACHE_REPO: penthertz/rfswift | |
DO_SPACES_ENDPOINT: ${{ secrets.BUCKET_URL }} | |
DO_SPACES_REGION: ${{ secrets.BUCKET_REGION }} | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '**' | |
jobs: | |
corebuild: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: [amd64, arm64, riscv64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push corebuild image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make common | |
corebuild-manifest: | |
runs-on: ubuntu-latest | |
needs: corebuild | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for corebuild | |
if: steps.file_check.outputs.run_job_corebuild == 'true' | |
run: | | |
tagname=corebuild | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
output_riscv64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64@$arch_digest_riscv64 | |
sdrsa_devices: | |
runs-on: ubuntu-latest | |
needs: corebuild | |
strategy: | |
matrix: | |
platform: [amd64, arm64, riscv64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push sdr_light image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} UHD_BASE=uhd RTLSDR_BASE=rtlsdr make sdrsadevices | |
sdrsa_devices-manifest: | |
runs-on: ubuntu-latest | |
needs: sdrsa_devices | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for sdrsa_devices | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' | |
run: | | |
tagname=sdrsa_devices | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
output_riscv64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64@$arch_digest_riscv64 | |
sdrsa_devices_antsdr: | |
runs-on: ubuntu-latest | |
needs: corebuild | |
strategy: | |
matrix: | |
platform: [amd64, arm64, riscv64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light_antsdr.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_antsdr_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_antsdr_devices::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_antsdr_devices == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_antsdr_devices == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push sdr_light image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_antsdr_devices == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} UHD_BASE=antsdr_uhd RTLSDR_BASE=rtlsdr make sdrsadevicesantsdr | |
sdrsa_devices_antsdr-manifest: | |
runs-on: ubuntu-latest | |
needs: sdrsa_devices_antsdr | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light_antsdr.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_antsdr_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_antsdr_devices::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_antsdr_devices == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_antsdr_devices == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for sdrsa_devices_antsdr | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_antsdr_devices == 'true' | |
run: | | |
tagname=sdrsa_devices_antsdr | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
output_riscv64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64@$arch_digest_riscv64 | |
sdrsa_devices_rtlsdrv4: | |
runs-on: ubuntu-latest | |
needs: corebuild | |
strategy: | |
matrix: | |
platform: [amd64, arm64, riscv64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light_rtlsdrv4.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_rtlsdrv4_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_rtlsdrv4_devices::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_rtlsdrv4_devices == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_rtlsdrv4_devices == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push sdr_light image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_rtlsdrv4_devices == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} UHD_BASE=uhd RTLSDR_BASE=rtlsdrv4 make sdrsadevicesrtlsdrv4 | |
sdrsa_devices_rtlsdrv4-manifest: | |
runs-on: ubuntu-latest | |
needs: sdrsa_devices_rtlsdrv4 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light_rtlsdrv4.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_rtlsdrv4_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_rtlsdrv4_devices::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_rtlsdrv4_devices == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_rtlsdrv4_devices == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for sdrsa_devices_rtlsdrv4 | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_rtlsdrv4_devices == 'true' | |
run: | | |
tagname=sdrsa_devices_rtlsdrv4 | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
output_riscv64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64@$arch_digest_riscv64 | |
sdr_light: | |
runs-on: ubuntu-latest | |
needs: sdrsa_devices | |
strategy: | |
matrix: | |
platform: [amd64, arm64, riscv64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light::true" | |
else | |
echo "::set-output name=run_job_sdr_light::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push sdr_light image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make sdrlight | |
sdr_light-manifest: | |
runs-on: ubuntu-latest | |
needs: sdr_light | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light::true" | |
else | |
echo "::set-output name=run_job_sdr_light::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for sdr_light | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' | |
run: | | |
tagname=sdr_light | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
output_riscv64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64@$arch_digest_riscv64 | |
deeptempest: | |
runs-on: Linux | |
needs: sdrsa_devices | |
strategy: | |
matrix: | |
platform: [amd64, arm64, riscv64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light::true" | |
else | |
echo "::set-output name=run_job_sdr_light::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push sdr_light image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make deeptempest | |
deeptempest-manifest: | |
runs-on: Linux | |
needs: deeptempest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light::true" | |
else | |
echo "::set-output name=run_job_sdr_light::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for sdr_light | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' | |
run: | | |
tagname=deeptempest | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
output_riscv64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64@$arch_digest_riscv64 | |
sdr_light_intelgpu: | |
runs-on: ubuntu-latest | |
needs: sdr_light | |
strategy: | |
matrix: | |
platform: [amd64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light::true" | |
else | |
echo "::set-output name=run_job_sdr_light::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light_intelgpu.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || steps.file_check.outputs.run_job_sdr_light == 'true' || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light_intelgpu::true" | |
else | |
echo "::set-output name=run_job_sdr_light_intelgpu::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdr_light_intelgpu == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdr_light_intelgpu == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push sdr_light image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdr_light_intelgpu == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make sdrlight_intelgpu | |
sdr_light_nvidiagpu: | |
runs-on: ubuntu-latest | |
needs: sdr_light | |
strategy: | |
matrix: | |
platform: [amd64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light::true" | |
else | |
echo "::set-output name=run_job_sdr_light::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light_nvidiagpu.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || steps.file_check.outputs.run_job_sdr_light == 'true' || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light_nvidiagpu::true" | |
else | |
echo "::set-output name=run_job_sdr_light_nvidiagpu::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdr_light_nvidiagpu == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdr_light_nvidiagpu == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push sdr_light image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdr_light_nvidiagpu == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make sdrlight_nvidiagpu | |
sdr_full: | |
runs-on: Linux | |
needs: sdr_light | |
strategy: | |
matrix: | |
platform: [amd64, arm64, riscv64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light::true" | |
else | |
echo "::set-output name=run_job_sdr_light::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR_full.docker"* || "$MODIFIED_FILES" == *"scripts/sdr_softwares.sh"* || "$MODIFIED_FILES" == *"scripts/gr_oot_modules.sh"* ]]; then | |
echo "::set-output name=run_job_sdrfull::true" | |
else | |
echo "::set-output name=run_job_sdrfull::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdrfull == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdrfull == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push sdr_full image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdrfull == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make sdrfull | |
sdr_full-manifest: | |
runs-on: Linux | |
needs: sdr_full | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light::true" | |
else | |
echo "::set-output name=run_job_sdr_light::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR_full.docker"* || "$MODIFIED_FILES" == *"scripts/sdr_softwares.sh"* || "$MODIFIED_FILES" == *"scripts/gr_oot_modules.sh"* ]]; then | |
echo "::set-output name=run_job_sdrfull::true" | |
else | |
echo "::set-output name=run_job_sdrfull::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdrfull == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdrfull == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for sdr_full | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdrfull == 'true' | |
run: | | |
tagname=sdr_full | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
output_riscv64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64@$arch_digest_riscv64 | |
sdr_full_intelgpu: | |
runs-on: Linux | |
needs: sdr_light_intelgpu | |
strategy: | |
matrix: | |
platform: [amd64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light::true" | |
else | |
echo "::set-output name=run_job_sdr_light::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light_intelgpu.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || steps.file_check.outputs.run_job_sdr_light == 'true' || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light_intelgpu::true" | |
else | |
echo "::set-output name=run_job_sdr_light_intelgpu::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR_full.docker"* || "$MODIFIED_FILES" == *"scripts/sdr_softwares.sh"* || "$MODIFIED_FILES" == *"scripts/gr_oot_modules.sh"* ]]; then | |
echo "::set-output name=run_job_sdrfull_intelgpu::true" | |
else | |
echo "::set-output name=run_job_sdrfull_intelgpu::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdrfull_intelgpu == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdrfull_intelgpu == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push sdr_full image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdrfull_intelgpu == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make sdrfull_intelgpu | |
sdr_full_nvidiagpu: | |
runs-on: Linux | |
needs: sdr_light_nvidiagpu | |
strategy: | |
matrix: | |
platform: [amd64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light_rtlsdrv4.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light::true" | |
else | |
echo "::set-output name=run_job_sdr_light::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdr_light_nvidiagpu.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || steps.file_check.outputs.run_job_sdr_light == 'true' || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdr_light_nvidiagpu::true" | |
else | |
echo "::set-output name=run_job_sdr_light_nvidiagpu::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR_full.docker"* || "$MODIFIED_FILES" == *"scripts/sdr_softwares.sh"* || "$MODIFIED_FILES" == *"scripts/gr_oot_modules.sh"* ]]; then | |
echo "::set-output name=run_job_sdrfull_nvidiagpu::true" | |
else | |
echo "::set-output name=run_job_sdrfull_nvidiagpu::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdrfull_nvidiagpu == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdrfull_nvidiagpu == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push sdr_full image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_sdr_light == 'true' || steps.file_check.outputs.run_job_sdrfull_nvidiagpu == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make sdrfull_nvidiagpu | |
telecom_utils: | |
runs-on: ubuntu-latest | |
needs: sdrsa_devices | |
strategy: | |
matrix: | |
platform: [amd64, arm64, riscv64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/telecom_utils.docker"* || "$MODIFIED_FILES" == *"scripts/telecom_software.sh"* ]]; then | |
echo "::set-output name=run_job_telecom::true" | |
else | |
echo "::set-output name=run_job_telecom::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push telecom utils with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make telecom_utils | |
telecom_utils-manifest: | |
runs-on: ubuntu-latest | |
needs: telecom_utils | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/telecom_utils.docker"* || "$MODIFIED_FILES" == *"scripts/telecom_software.sh"* ]]; then | |
echo "::set-output name=run_job_telecom::true" | |
else | |
echo "::set-output name=run_job_telecom::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for telecom 2G to 3G | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
run: | | |
tagname=telecom_utils | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
output_riscv64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64@$arch_digest_riscv64 | |
telecom_2Gto3G: | |
runs-on: ubuntu-latest | |
needs: telecom_utils | |
strategy: | |
matrix: | |
platform: [amd64, arm64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/telecom_2Gto3G.docker"* || "$MODIFIED_FILES" == *"scripts/telecom_software.sh"* ]]; then | |
echo "::set-output name=run_job_telecom::true" | |
else | |
echo "::set-output name=run_job_telecom::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push telecom 2G to 3G image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make telecom_2Gto3G | |
telecom_2Gto3G-manifest: | |
runs-on: ubuntu-latest | |
needs: telecom_2Gto3G | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/telecom_2Gto3G.docker"* || "$MODIFIED_FILES" == *"scripts/telecom_software.sh"* ]]; then | |
echo "::set-output name=run_job_telecom::true" | |
else | |
echo "::set-output name=run_job_telecom::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for telecom 2G to 3G | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
run: | | |
tagname=telecom_2Gto3G | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 | |
telecom_4G_5GNSA: | |
runs-on: ubuntu-latest | |
needs: telecom_utils | |
strategy: | |
matrix: | |
platform: [amd64, arm64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/telecom_4G_5GNSA.docker"* || "$MODIFIED_FILES" == *"scripts/telecom_software.sh"* ]]; then | |
echo "::set-output name=run_job_telecom::true" | |
else | |
echo "::set-output name=run_job_telecom::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push telecom 4G to 5G NSA image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make telecom_4G_5GNSA | |
telecom_4G_5GNSA-manifest: | |
runs-on: ubuntu-latest | |
needs: telecom_4G_5GNSA | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/telecom_4G_5GNSA.docker"* || "$MODIFIED_FILES" == *"scripts/telecom_software.sh"* ]]; then | |
echo "::set-output name=run_job_telecom::true" | |
else | |
echo "::set-output name=run_job_telecom::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for telecom 4G to 5G NSA | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
run: | | |
tagname=telecom_4G_5GNSA | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 | |
telecom_5G: | |
runs-on: ubuntu-latest | |
needs: telecom_utils | |
strategy: | |
matrix: | |
platform: [amd64, arm64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/telecom_5G.docker"* || "$MODIFIED_FILES" == *"scripts/telecom_software.sh"* ]]; then | |
echo "::set-output name=run_job_telecom::true" | |
else | |
echo "::set-output name=run_job_telecom::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push telecom 4G to 5G NSA image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make telecom_5G | |
telecom_5G-manifest: | |
runs-on: ubuntu-latest | |
needs: telecom_5G | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/telecom_5G.docker"* || "$MODIFIED_FILES" == *"scripts/telecom_software.sh"* ]]; then | |
echo "::set-output name=run_job_telecom::true" | |
else | |
echo "::set-output name=run_job_telecom::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for telecom 5G | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_telecom == 'true' | |
run: | | |
tagname=telecom_5G | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 | |
wifi_basic: | |
runs-on: Linux | |
needs: sdrsa_devices | |
strategy: | |
matrix: | |
platform: [amd64, arm64, riscv64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/wifi_basic.docker"* || "$MODIFIED_FILES" == *"scripts/rf_tools.sh"* ]]; then | |
echo "::set-output name=run_job_wifi::true" | |
else | |
echo "::set-output name=run_job_wifi::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_wifi == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_wifi == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push wifi_basic image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_wifi == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make wifi_basic | |
wifi_basic-manifest: | |
runs-on: Linux | |
needs: wifi_basic | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/wifi_basic.docker"* || "$MODIFIED_FILES" == *"scripts/rf_tools.sh"* ]]; then | |
echo "::set-output name=run_job_wifi::true" | |
else | |
echo "::set-output name=run_job_wifi::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_wifi == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_wifi == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for wifi_basic | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_wifi == 'true' | |
run: | | |
tagname=wifi_basic | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
output_riscv64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64@$arch_digest_riscv64 | |
wifi_full: | |
runs-on: Linux | |
needs: wifi_basic | |
strategy: | |
matrix: | |
platform: [amd64, arm64, riscv64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/wifi_full.docker"* || "$MODIFIED_FILES" == *"scripts/rf_tools.sh"* ]]; then | |
echo "::set-output name=run_job_wifi::true" | |
else | |
echo "::set-output name=run_job_wifi::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_wifi == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_wifi == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push wifi_full image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_wifi == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make wifi_full | |
wifi_full-manifest: | |
runs-on: Linux | |
needs: wifi_full | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/wifi_full.docker"* || "$MODIFIED_FILES" == *"scripts/rf_tools.sh"* ]]; then | |
echo "::set-output name=run_job_wifi::true" | |
else | |
echo "::set-output name=run_job_wifi::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_wifi == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_wifi == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for wifi_full | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_wifi == 'true' | |
run: | | |
tagname=wifi_full | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
output_riscv64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64@$arch_digest_riscv64 | |
bluetooth: | |
runs-on: ubuntu-latest | |
needs: sdrsa_devices | |
strategy: | |
matrix: | |
platform: [amd64, arm64, riscv64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/bluetooth.docker"* || "$MODIFIED_FILES" == *"scripts/rf_tools.sh"* ]]; then | |
echo "::set-output name=run_job_bt::true" | |
else | |
echo "::set-output name=run_job_bt::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_bt == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_bt == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push bluetooth image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_bt == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make bluetooth | |
bluetooth-manifest: | |
runs-on: ubuntu-latest | |
needs: bluetooth | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/SDR/sdrsa_devices.docker"* || "$MODIFIED_FILES" == *"scripts/sa_devices.sh"* || "$MODIFIED_FILES" == *"scripts/sdr_peripherals.sh"* ]]; then | |
echo "::set-output name=run_job_sdrsa_devices::true" | |
else | |
echo "::set-output name=run_job_sdrsa_devices::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/bluetooth.docker"* || "$MODIFIED_FILES" == *"scripts/rf_tools.sh"* ]]; then | |
echo "::set-output name=run_job_bt::true" | |
else | |
echo "::set-output name=run_job_bt::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_bt == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_bt == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for bluetooth | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_bt == 'true' | |
run: | | |
tagname=bluetooth | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
output_riscv64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64@$arch_digest_riscv64 | |
rfid: | |
runs-on: ubuntu-latest | |
needs: corebuild | |
strategy: | |
matrix: | |
platform: [amd64, arm64, riscv64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/rfid.docker"* || "$MODIFIED_FILES" == *"scripts/rf_tools.sh"* ]]; then | |
echo "::set-output name=run_job_rfid::true" | |
else | |
echo "::set-output name=run_job_rfid::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_rfid == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_rfid == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push rfid image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_rfid == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make rfid | |
rfid-manifest: | |
runs-on: ubuntu-latest | |
needs: rfid | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/rfid.docker"* || "$MODIFIED_FILES" == *"scripts/rf_tools.sh"* ]]; then | |
echo "::set-output name=run_job_rfid::true" | |
else | |
echo "::set-output name=run_job_rfid::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_rfid == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_rfid == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for rfid | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_rfid == 'true' | |
run: | | |
tagname=rfid | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
output_riscv64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_riscv64@$arch_digest_riscv64 | |
automotive: | |
runs-on: ubuntu-latest | |
needs: corebuild | |
strategy: | |
matrix: | |
platform: [amd64, arm64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/automotive.docker"* || "$MODIFIED_FILES" == *"scripts/automotive_software.sh"* ]]; then | |
echo "::set-output name=run_job_automotive::true" | |
else | |
echo "::set-output name=run_job_automotive::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_automotive == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_automotive == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push automotive image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_automotive == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make automotive | |
automotive-manifest: | |
runs-on: ubuntu-latest | |
needs: automotive | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/automotive.docker"* || "$MODIFIED_FILES" == *"scripts/automotive_software.sh"* ]]; then | |
echo "::set-output name=run_job_automotive::true" | |
else | |
echo "::set-output name=run_job_automotive::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_automotive == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_automotive == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for automotive | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_automotive == 'true' | |
run: | | |
tagname=automotive | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 | |
reversing: | |
runs-on: ubuntu-latest | |
needs: corebuild | |
strategy: | |
matrix: | |
platform: [amd64, arm64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/reversing.docker"* || "$MODIFIED_FILES" == *"scripts/reverse_software.sh"* || "$MODIFIED_FILES" == *"scripts/sast_software.sh"* ]]; then | |
echo "::set-output name=run_job_reversing::true" | |
else | |
echo "::set-output name=run_job_reversing::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_reversing == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_reversing == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push reversing image with caching | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_reversing == 'true' | |
run: | | |
cd Dockerfiles | |
STORAGE_TYPE=registry ARCH=${{ matrix.platform }} CACHE_REPO=${{ env.CACHE_REPO }} REGISTRY_IMAGE=${{ env.REGISTRY_IMAGE }} make reversing | |
reversing-manifest: | |
runs-on: ubuntu-latest | |
needs: reversing | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Check for modified files | |
id: file_check | |
run: | | |
git fetch origin | |
MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD) | |
echo "Modified files: $MODIFIED_FILES" | |
if [[ "$MODIFIED_FILES" == *"config/"* || "$MODIFIED_FILES" == *"Dockerfiles/Makefile"* || "$MODIFIED_FILES" == *"scripts/terminal_harness.sh"* || "$MODIFIED_FILES" == *"run/"* || "$MODIFIED_FILES" == *"Dockerfiles/corebuild.docker"* || "$MODIFIED_FILES" == *"scripts/common.sh"* || "$MODIFIED_FILES" == *"scripts/entrypoint.sh"* || "$MODIFIED_FILES" == *"scripts/corebuild.sh"* || "$MODIFIED_FILES" == *"docs/guide.md"* ]]; then | |
echo "::set-output name=run_job_corebuild::true" | |
else | |
echo "::set-output name=run_job_corebuild::false" | |
fi | |
if [[ "$MODIFIED_FILES" == *"Dockerfiles/reversing.docker"* || "$MODIFIED_FILES" == *"scripts/reverse_software.sh"* || "$MODIFIED_FILES" == *"scripts/sast_software.sh"* ]]; then | |
echo "::set-output name=run_job_reversing::true" | |
else | |
echo "::set-output name=run_job_reversing::false" | |
fi | |
- name: Set up Docker Buildx | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_reversing == 'true' | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
version: latest | |
- name: Log in to Docker Hub | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_reversing == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest for reversing | |
if: steps.file_check.outputs.run_job_corebuild == 'true' || steps.file_check.outputs.run_job_sdrsa_devices == 'true' || steps.file_check.outputs.run_job_reversing == 'true' | |
run: | | |
tagname=reversing | |
# Inspect images for different architectures | |
output_amd64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_amd64) | |
output_arm64=$(docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${tagname}_arm64) | |
# Extract the digests | |
arch_digest_amd64=$(echo "$output_amd64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_arm64=$(echo "$output_arm64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
arch_digest_riscv64=$(echo "$output_riscv64" | grep "vnd.docker.reference.digest:" | awk '{print $2}') | |
# Debug: Print the extracted digests | |
echo "amd64 digest: $arch_digest_amd64" | |
echo "arm64 digest: $arch_digest_arm64" | |
echo "riscv64 digest: $arch_digest_riscv64" | |
# Create and push the multi-arch manifest | |
docker buildx imagetools create \ | |
--tag ${{ env.REGISTRY_IMAGE }}:$tagname \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_amd64@$arch_digest_amd64 \ | |
${{ env.REGISTRY_IMAGE }}:${tagname}_arm64@$arch_digest_arm64 |