Skip to content

Commit 5a2cb62

Browse files
committed
Merge branch 'devel' into devel_CCT_Optim
2 parents d9c47df + e536374 commit 5a2cb62

147 files changed

Lines changed: 3185 additions & 1504 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright 2021 ETH Zurich and University of Bologna.
2+
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Use LLVM's style
6+
BasedOnStyle: LLVM
7+
ColumnLimit: 80
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: Milestone
3+
about: Deeploy's Milestone
4+
title: '[MILESTONE] '
5+
labels: milestone
6+
assignees: ''
7+
8+
---
9+
# Milestone Title
10+
11+
## Description
12+
A clear and concise description of the milestone.

.github/workflows/BuildDocker.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
name: BuildDockerDeeploy
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
docker_image_toolchain:
7+
description: 'Deeploy Toolchain Image to use'
8+
required: false
9+
default: 'ghcr.io/pulp-platform/deeploy-toolchain:latest'
10+
11+
jobs:
12+
prepare:
13+
name: Fetch branch name or tag
14+
runs-on: ubuntu-latest
15+
outputs:
16+
docker_tag: ${{ steps.generate_tag.outputs.docker_tag }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up environment variables
21+
run: |
22+
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
23+
echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
24+
echo "IS_TAG=${GITHUB_REF_TYPE}" >> $GITHUB_ENV
25+
26+
- name: Set Docker tag
27+
id: generate_tag
28+
run: |
29+
if [[ "${{ env.IS_TAG }}" == "tag" ]]; then
30+
echo "docker_tag=${{ env.TAG_NAME }}" >> $GITHUB_OUTPUT
31+
else
32+
echo "docker_tag=${{ env.BRANCH_NAME }}" >> $GITHUB_OUTPUT
33+
fi
34+
35+
build-deeploy:
36+
name: Build Deploy Image
37+
needs: [ prepare ]
38+
runs-on: ${{ matrix.runner }}
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
platform: [amd64, arm64]
43+
include:
44+
- platform: amd64
45+
runner: ubuntu-latest
46+
- platform: arm64
47+
runner: ubuntu-22.04-arm
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- name: Free up disk space
52+
uses: jlumbroso/free-disk-space@v1.3.1
53+
with:
54+
android: true
55+
dotnet: true
56+
haskell: true
57+
large-packages: true
58+
59+
- uses: docker/setup-buildx-action@v1
60+
61+
- name: GHCR Log-in
62+
uses: docker/login-action@v1
63+
with:
64+
registry: ghcr.io
65+
username: ${{ github.actor }}
66+
password: ${{ secrets.GITHUB_TOKEN }}
67+
68+
- name: Build Cache for Docker
69+
uses: actions/cache@v3
70+
with:
71+
path: var-ccache
72+
key: ${{ runner.os }}-${{ matrix.platform }}-build-cache-deeploy
73+
74+
- name: Inject build-cache
75+
uses: reproducible-containers/buildkit-cache-dance@v3.1.0
76+
with:
77+
cache-map: |
78+
{
79+
"var-ccache": "/ccache"
80+
}
81+
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
82+
83+
- name: Lower Case Repository Name
84+
run: |
85+
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
86+
env:
87+
OWNER: '${{ github.repository_owner }}'
88+
89+
- name: Build and push final deploy image
90+
uses: docker/build-push-action@v6
91+
with:
92+
platforms: linux/${{ matrix.platform }}
93+
context: .
94+
cache-from: type=gha
95+
cache-to: type=gha,mode=min
96+
file: Container/Dockerfile.deeploy
97+
push: true
98+
build-args: |
99+
BASE_IMAGE=${{ github.event.inputs.docker_image_toolchain }}
100+
tags: |
101+
ghcr.io/${{ env.OWNER_LC }}/deeploy:latest-${{ matrix.platform }}
102+
ghcr.io/${{ env.OWNER_LC }}/deeploy:${{ needs.prepare.outputs.docker_tag }}-${{ matrix.platform }}
103+
104+
merge-deeploy-images:
105+
name: Merge Deeploy Images
106+
runs-on: ubuntu-latest
107+
needs: [ prepare, build-deeploy ]
108+
steps:
109+
- name: GHCR Log-in
110+
uses: docker/login-action@v1
111+
with:
112+
registry: ghcr.io
113+
username: ${{ github.actor }}
114+
password: ${{ secrets.GITHUB_TOKEN }}
115+
116+
- name: Lower Case Repository Name
117+
run: |
118+
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
119+
env:
120+
OWNER: '${{ github.repository_owner }}'
121+
122+
- uses: Noelware/docker-manifest-action@v1
123+
with:
124+
inputs: ghcr.io/${{ env.OWNER_LC }}/deeploy:latest-amd64,ghcr.io/${{ env.OWNER_LC }}/deeploy:latest-arm64
125+
tags: ghcr.io/${{ env.OWNER_LC }}/deeploy:latest,ghcr.io/${{ env.OWNER_LC }}/deeploy:${{ needs.prepare.outputs.docker_tag }}
126+
push: true
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: BuildDockerToolchain
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
prepare:
8+
name: Fetch branch name or tag
9+
runs-on: ubuntu-latest
10+
outputs:
11+
docker_tag: ${{ steps.generate_tag.outputs.docker_tag }}
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up environment variables
16+
run: |
17+
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
18+
echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
19+
echo "IS_TAG=${GITHUB_REF_TYPE}" >> $GITHUB_ENV
20+
21+
- name: Set Docker tag
22+
id: generate_tag
23+
run: |
24+
if [[ "${{ env.IS_TAG }}" == "tag" ]]; then
25+
echo "docker_tag=${{ env.TAG_NAME }}" >> $GITHUB_OUTPUT
26+
else
27+
echo "docker_tag=${{ env.BRANCH_NAME }}" >> $GITHUB_OUTPUT
28+
fi
29+
30+
build-toolchain:
31+
name: Build Deeploy Toolchain Image
32+
needs: [ prepare ]
33+
runs-on: ${{ matrix.runner }}
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
platform: [amd64, arm64]
38+
include:
39+
- platform: amd64
40+
runner: ubuntu-latest
41+
- platform: arm64
42+
runner: ubuntu-22.04-arm
43+
steps:
44+
- uses: actions/checkout@v2
45+
46+
- name: Free up disk space
47+
uses: jlumbroso/free-disk-space@v1.3.1
48+
with:
49+
android: true
50+
dotnet: true
51+
haskell: true
52+
large-packages: true
53+
54+
- uses: docker/setup-buildx-action@v1
55+
56+
- name: GHCR Log-in
57+
uses: docker/login-action@v1
58+
with:
59+
registry: ghcr.io
60+
username: ${{ github.actor }}
61+
password: ${{ secrets.GITHUB_TOKEN }}
62+
63+
- name: Build Cache for Docker
64+
uses: actions/cache@v3
65+
with:
66+
path: var-ccache
67+
key: ${{ runner.os }}-${{ matrix.platform }}-build-cache-toolchain
68+
69+
- name: Inject build-cache
70+
uses: reproducible-containers/buildkit-cache-dance@v3.1.0
71+
with:
72+
cache-map: |
73+
{
74+
"var-ccache": "/ccache"
75+
}
76+
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
77+
78+
- name: Lower Case Repository Name
79+
run: |
80+
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
81+
env:
82+
OWNER: '${{ github.repository_owner }}'
83+
84+
- name: Build and push toolchain image
85+
uses: docker/build-push-action@v6
86+
with:
87+
platforms: linux/${{ matrix.platform }}
88+
context: .
89+
file: Container/Dockerfile.toolchain
90+
push: true
91+
tags: |
92+
ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:latest-${{ matrix.platform }}
93+
ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:${{ needs.prepare.outputs.docker_tag }}-${{ matrix.platform }}
94+
95+
merge-toolchain-images:
96+
name: Merge Deeploy Toolchain Images
97+
runs-on: ubuntu-latest
98+
needs: [ prepare, build-toolchain ]
99+
steps:
100+
- name: GHCR Log-in
101+
uses: docker/login-action@v1
102+
with:
103+
registry: ghcr.io
104+
username: ${{ github.actor }}
105+
password: ${{ secrets.GITHUB_TOKEN }}
106+
107+
- name: Lower Case Repository Name
108+
run: |
109+
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
110+
env:
111+
OWNER: '${{ github.repository_owner }}'
112+
113+
- uses: Noelware/docker-manifest-action@v1
114+
with:
115+
inputs: ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:latest-amd64,ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:latest-arm64
116+
tags: ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:latest,ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:${{ needs.prepare.outputs.docker_tag }}
117+
push: true

0 commit comments

Comments
 (0)