-
Notifications
You must be signed in to change notification settings - Fork 40
Add GAP9 Container Support #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devel
Are you sure you want to change the base?
Changes from all commits
bedec91
97c2d2b
3423c54
d6b6ac9
daf8cda
f1c7d57
646563d
b2b43a5
1a075d0
2bb1bf5
af405a2
c6bc2c6
d325f79
53b4bb9
6d1c8c3
6db1c52
8255753
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,150 @@ | ||
| # SPDX-FileCopyrightText: 2025 ETH Zurich and University of Bologna | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| --- | ||
| name: Docker • Build Deeploy GAP9 Container | ||
|
|
||
| "on": | ||
| workflow_dispatch: | ||
| inputs: | ||
| docker_image_deeploy: | ||
| description: "Deeploy Image to use" | ||
| required: false | ||
| default: "ghcr.io/pulp-platform/deeploy:latest" | ||
|
|
||
| jobs: | ||
| prepare: | ||
| name: Fetch branch name or tag | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| docker_tag: ${{ steps.generate_tag.outputs.docker_tag }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up environment variables | ||
| run: | | ||
| echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
| echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
| echo "IS_TAG=${GITHUB_REF_TYPE}" >> $GITHUB_ENV | ||
|
|
||
| - name: Set Docker tag | ||
| id: generate_tag | ||
| run: | | ||
| if [[ "${{ env.IS_TAG }}" == "tag" ]]; then | ||
| echo "docker_tag=${{ env.TAG_NAME }}" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "docker_tag=${{ env.BRANCH_NAME }}" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| build-deeploy-gap9: | ||
| name: Build Deeploy GAP9 Image | ||
| needs: [prepare] | ||
| runs-on: ${{ matrix.runner }} | ||
| outputs: | ||
| digest-amd64: ${{ steps.digest.outputs.digest-amd64 }} | ||
| digest-arm64: ${{ steps.digest.outputs.digest-arm64 }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| platform: [amd64, arm64] | ||
| include: | ||
| - platform: amd64 | ||
| runner: ubuntu-latest | ||
| - platform: arm64 | ||
| runner: ubuntu-22.04-arm | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Free up disk space | ||
| uses: jlumbroso/free-disk-space@v1.3.1 | ||
| with: | ||
| tool-cache: true | ||
| android: true | ||
| dotnet: true | ||
| haskell: true | ||
| large-packages: true | ||
|
|
||
| - uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: GHCR Log-in | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build Cache for Docker | ||
| id: cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: var-ccache | ||
| key: ${{ runner.os }}-${{ matrix.platform }}-build-cache-deeploy-gap9 | ||
|
|
||
| - name: Inject build-cache | ||
| uses: reproducible-containers/buildkit-cache-dance@v3.1.0 | ||
| with: | ||
| cache-map: | | ||
| { | ||
| "var-ccache": "/ccache" | ||
| } | ||
| skip-extraction: ${{ steps.cache.outputs.cache-hit }} | ||
|
|
||
| - name: Lower Case Repository Name | ||
| run: | | ||
| echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV} | ||
| env: | ||
| OWNER: "${{ github.repository_owner }}" | ||
|
|
||
| - name: Load SSH key | ||
| uses: webfactory/ssh-agent@v0.9.0 | ||
| with: | ||
| ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
|
||
| - name: Build and push final Deeploy image | ||
| id: build | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| platforms: linux/${{ matrix.platform }} | ||
| context: . | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=min | ||
| file: Container/Dockerfile.deeploy-gap9 | ||
| push: true | ||
| build-args: | | ||
| DEEPLOY_IMAGE=${{ github.event.inputs.docker_image_deeploy }} | ||
| ssh: default | ||
| outputs: type=image,name=ghcr.io/${{ env.OWNER_LC }}/deeploy-gap9,annotation-index=true,name-canonical=true,push=true | ||
|
|
||
| - name: Extract image digest | ||
| id: digest | ||
| run: echo "digest-${{ matrix.platform }}=${{ steps.build.outputs.digest }}" >> $GITHUB_OUTPUT | ||
|
|
||
| merge-deeploy-gap9-images: | ||
| name: Merge Deeploy GAP9 Images | ||
| runs-on: ubuntu-latest | ||
| needs: [prepare, build-deeploy-gap9] | ||
| steps: | ||
| - name: GHCR Log-in | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Lower Case Repository Name | ||
| run: | | ||
| echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV} | ||
| env: | ||
| OWNER: "${{ github.repository_owner }}" | ||
|
|
||
| - name: Merge Deeploy GAP9 Images | ||
| uses: Noelware/docker-manifest-action@v1 | ||
| with: | ||
| inputs: | | ||
| ghcr.io/${{ env.OWNER_LC }}/deeploy-gap9@${{ needs.build-deeploy-gap9.outputs.digest-amd64 }}, | ||
| ghcr.io/${{ env.OWNER_LC }}/deeploy-gap9@${{ needs.build-deeploy-gap9.outputs.digest-arm64 }} | ||
| tags: | | ||
| ghcr.io/${{ env.OWNER_LC }}/deeploy-gap9:latest, | ||
| ghcr.io/${{ env.OWNER_LC }}/deeploy-gap9:${{ needs.prepare.outputs.docker_tag }} | ||
| push: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| # SPDX-FileCopyrightText: 2025 ETH Zurich and University of Bologna | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # If you come from bash you might have to change your $PATH. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest removing the tutorial comments from this file.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure what exactly you mean? Removing all the comments?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes or keeping it minimal, we don't need all these commands to teach us how to set it up |
||
| # export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH | ||
|
|
||
| # Path to your Oh My Zsh installation. | ||
| export ZSH="$HOME/.oh-my-zsh" | ||
|
|
||
| # Set name of the theme to load --- if set to "random", it will | ||
| # load a random theme each time Oh My Zsh is loaded, in which case, | ||
| # to know which specific one was loaded, run: echo $RANDOM_THEME | ||
| # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes | ||
| ZSH_THEME="cypher" | ||
|
|
||
| # Set list of themes to pick from when loading at random | ||
| # Setting this variable when ZSH_THEME=random will cause zsh to load | ||
| # a theme from this variable instead of looking in $ZSH/themes/ | ||
| # If set to an empty array, this variable will have no effect. | ||
| # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) | ||
|
|
||
| # Uncomment the following line to use case-sensitive completion. | ||
| # CASE_SENSITIVE="true" | ||
|
|
||
| # Uncomment the following line to use hyphen-insensitive completion. | ||
| # Case-sensitive completion must be off. _ and - will be interchangeable. | ||
| # HYPHEN_INSENSITIVE="true" | ||
|
|
||
| # Uncomment one of the following lines to change the auto-update behavior | ||
| # zstyle ':omz:update' mode disabled # disable automatic updates | ||
| # zstyle ':omz:update' mode auto # update automatically without asking | ||
| # zstyle ':omz:update' mode reminder # just remind me to update when it's time | ||
|
|
||
| # Uncomment the following line to change how often to auto-update (in days). | ||
| # zstyle ':omz:update' frequency 13 | ||
|
|
||
| # Uncomment the following line if pasting URLs and other text is messed up. | ||
| # DISABLE_MAGIC_FUNCTIONS="true" | ||
|
|
||
| # Uncomment the following line to disable colors in ls. | ||
| # DISABLE_LS_COLORS="true" | ||
|
|
||
| # Uncomment the following line to disable auto-setting terminal title. | ||
| # DISABLE_AUTO_TITLE="true" | ||
|
|
||
| # Uncomment the following line to enable command auto-correction. | ||
| # ENABLE_CORRECTION="true" | ||
|
|
||
| # Uncomment the following line to display red dots whilst waiting for completion. | ||
| # You can also set it to another string to have that shown instead of the default red dots. | ||
| # e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" | ||
| # Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) | ||
| # COMPLETION_WAITING_DOTS="true" | ||
|
|
||
| # Uncomment the following line if you want to disable marking untracked files | ||
| # under VCS as dirty. This makes repository status check for large repositories | ||
| # much, much faster. | ||
| # DISABLE_UNTRACKED_FILES_DIRTY="true" | ||
|
|
||
| # Uncomment the following line if you want to change the command execution time | ||
| # stamp shown in the history command output. | ||
| # You can set one of the optional three formats: | ||
| # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" | ||
| # or set a custom format using the strftime function format specifications, | ||
| # see 'man strftime' for details. | ||
| # HIST_STAMPS="mm/dd/yyyy" | ||
|
|
||
| # Would you like to use another custom folder than $ZSH/custom? | ||
| # ZSH_CUSTOM=/path/to/new-custom-folder | ||
|
|
||
| # Which plugins would you like to load? | ||
| # Standard plugins can be found in $ZSH/plugins/ | ||
| # Custom plugins may be added to $ZSH_CUSTOM/plugins/ | ||
| # Example format: plugins=(rails git textmate ruby lighthouse) | ||
| # Add wisely, as too many plugins slow down shell startup. | ||
| plugins=(git) | ||
|
|
||
| source $ZSH/oh-my-zsh.sh | ||
|
|
||
| # User configuration | ||
|
|
||
| # export MANPATH="/usr/local/man:$MANPATH" | ||
|
|
||
| # You may need to manually set your language environment | ||
| # export LANG=en_US.UTF-8 | ||
|
|
||
| # Preferred editor for local and remote sessions | ||
| # if [[ -n $SSH_CONNECTION ]]; then | ||
| # export EDITOR='vim' | ||
| # else | ||
| # export EDITOR='nvim' | ||
| # fi | ||
|
|
||
| # Compilation flags | ||
| # export ARCHFLAGS="-arch $(uname -m)" | ||
|
|
||
| # Set personal aliases, overriding those provided by Oh My Zsh libs, | ||
| # plugins, and themes. Aliases can be placed here, though Oh My Zsh | ||
| # users are encouraged to define aliases within a top-level file in | ||
| # the $ZSH_CUSTOM folder, with .zsh extension. Examples: | ||
| # - $ZSH_CUSTOM/aliases.zsh | ||
| # - $ZSH_CUSTOM/macos.zsh | ||
| # For a full list of active aliases, run `alias`. | ||
| # | ||
| # Example aliases | ||
| alias zshconfig="nano ~/.zshrc" | ||
| # alias ohmyzsh="mate ~/.oh-my-zsh" | ||
|
|
||
| unsetopt HIST_SAVE_BY_COPY | ||
| setopt APPEND_HISTORY | ||
| setopt SHARE_HISTORY | ||
| setopt HIST_IGNORE_ALL_DUPS | ||
|
|
||
| # Make sure the gap command of the GAP9 SDK works | ||
| unalias gap | ||
Uh oh!
There was an error while loading. Please reload this page.