mirror of
https://github.com/embedd-actions/arm-gcc-xpack-ci.git
synced 2024-12-25 08:22:06 +03:00
init
This commit is contained in:
commit
e8431f7f0b
42
.github/workflows/build_docker_image.yml
vendored
Normal file
42
.github/workflows/build_docker_image.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
name: Publish image
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout repository
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: sergeyladanov/arm-gcc-xpack
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
platforms: linux/amd64,linux/arm64
|
36
Dockerfile
Normal file
36
Dockerfile
Normal file
@ -0,0 +1,36 @@
|
||||
FROM debian:stable-slim
|
||||
|
||||
ARG VERSION=12.3.1-1.1
|
||||
|
||||
RUN ARCH="$(dpkg --print-architecture)" && \
|
||||
case $ARCH in \
|
||||
"amd64") \
|
||||
ARCH_TAG="x64" \
|
||||
;; \
|
||||
"arm64") \
|
||||
ARCH_TAG="arm64" \
|
||||
;; \
|
||||
esac && \
|
||||
# Get nessecary packages
|
||||
apt-get update && \
|
||||
apt-get install \
|
||||
--no-install-recommends \
|
||||
make \
|
||||
cmake \
|
||||
wget \
|
||||
ca-certificates \
|
||||
-y && \
|
||||
rm -rf /var/cache/apt && \
|
||||
mkdir /workdir && \
|
||||
cd /workdir && \
|
||||
wget https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v${VERSION}/xpack-arm-none-eabi-gcc-${VERSION}-linux-${ARCH_TAG}.tar.gz && \
|
||||
tar xvf xpack-arm-none-eabi-gcc-${VERSION}-linux-${ARCH_TAG}.tar.gz && \
|
||||
rm xpack-arm-none-eabi-gcc-${VERSION}-linux-${ARCH_TAG}.tar.gz
|
||||
|
||||
RUN echo 'export PATH="/workdir/xpack-arm-none-eabi-gcc-'${VERSION}'/bin:$PATH"' >> /etc/bashrc
|
||||
|
||||
ADD entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
27
README.md
Normal file
27
README.md
Normal file
@ -0,0 +1,27 @@
|
||||
# arm-gcc-xpack-ci
|
||||
|
||||
Building arm-gcc projects with xpack compilator
|
||||
|
||||
## Usage:
|
||||
|
||||
```
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Building project
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: make
|
||||
uses: embedd-actions/arm-gcc-ci@v12.3.1
|
||||
with:
|
||||
command: make --directory Release all
|
||||
|
||||
```
|
||||
|
||||
## List of available tags
|
||||
|
||||
```
|
||||
v12.3.1
|
||||
```
|
13
action.yml
Normal file
13
action.yml
Normal file
@ -0,0 +1,13 @@
|
||||
name: 'ARM GCC build'
|
||||
description: 'Building arm projects'
|
||||
inputs:
|
||||
command:
|
||||
description: 'Command'
|
||||
required: true
|
||||
default: arm-none-eabi-gcc --version
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'docker://sergeyladanov/arm-gcc:v12.3.1'
|
||||
args:
|
||||
- ${{ inputs.command }}
|
||||
|
10
docker-compose.yml
Normal file
10
docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
arm-gcc:
|
||||
container_name: arm-gcc
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- VERSION=12.3.1-1.1
|
5
entrypoint.sh
Normal file
5
entrypoint.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /etc/bashrc
|
||||
|
||||
exec $@
|
Loading…
Reference in New Issue
Block a user