Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 42 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,65 +10,65 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ccstudio
MAJOR_VER: 12
MINOR_VER: 8
MAJOR_VER: 20
MINOR_VER: 3
PATCH_VER: 1
BUILD_VER: "00005"
COMPONENTS: PF_MSP430,PF_MSP432,PF_MSPM0,PF_WCONN,PF_C28,PF_TM4C,PF_HERCULES,PF_SITARA,PF_SITARA_MCU,PF_OMAPL,PF_DAVINCI,PF_OMAP,PF_TDA_DRA,PF_C55,PF_C6000SC,PF_C66AK_KEYSTONE,PF_MMWAVE,PF_C64MC,PF_DIGITAL_POWER,PF_PGA
COMPONENTS: PF_SITARA_MCU,PF_ARM_MPU,PF_C28,PF_C6000SC,PF_HERCULES,PF_MMWAVE,PF_MSP430,PF_MSPM0,PF_MSPM33,PF_OMAPL,PF_PGA,PF_MSP432,PF_AUTO,PF_TM4C,PF_DIGITAL_POWER,PF_WCONN

jobs:
build-image-and-extract:
if: github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
- name: Create env vars
run: |
echo IMAGE=${{ env.REGISTRY }}/zigembeddedgroup/${{ env.IMAGE_NAME }}:${{ env.MAJOR_VER }}.${{ env.MINOR_VER }}.${{ env.PATCH_VER }}.${{ env.BUILD_VER }} >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} # This checks out the PR branch
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git
run: |
- name: Create env vars
run: |
echo IMAGE=${{ env.REGISTRY }}/zigembeddedgroup/${{ env.IMAGE_NAME }}:${{ env.MAJOR_VER }}.${{ env.MINOR_VER }}.${{ env.PATCH_VER }}.${{ env.BUILD_VER }} >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} # This checks out the PR branch
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: false
tags: ${{ env.IMAGE }}
build-args: |
MAJOR_VER=${{ env.MAJOR_VER }}
MINOR_VER=${{ env.MINOR_VER }}
PATCH_VER=${{ env.PATCH_VER }}
BUILD_VER=${{ env.BUILD_VER }}
COMPONENTS=${{ env.COMPONENTS }}
- name: Create temporary container
id: container
run: echo "::set-output name=id::$(docker create ${{ env.IMAGE }})"
- name: Extract files from container
run: |
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: false
tags: ${{ env.IMAGE }}
build-args: |
MAJOR_VER=${{ env.MAJOR_VER }}
MINOR_VER=${{ env.MINOR_VER }}
PATCH_VER=${{ env.PATCH_VER }}
BUILD_VER=${{ env.BUILD_VER }}
COMPONENTS=${{ env.COMPONENTS }}
- name: Create temporary container
id: container
run: echo "::set-output name=id::$(docker create ${{ env.IMAGE }})"
- name: Extract files from container
run: |
rm -rf targetdb msp430
docker cp ${{ steps.container.outputs.id }}:/opt/ti/ccs/ccs_base/common/targetdb .
docker cp ${{ steps.container.outputs.id }}:/opt/ti/ccs/ccs_base/msp430 tmp
mkdir -p msp430
cp tmp/include/*.cmd msp430
rm -rf tmp
- name: Remove temporary container
run: docker rm ${{ steps.container.outputs.id }}
- name: Remove temporary container
run: docker rm ${{ steps.container.outputs.id }}

- name: Commit changes
run: |
- name: Commit changes
run: |
git add targetdb msp430
git commit -m "commit targetdb, version ${{ env.MAJOR_VER }}.${{ env.MINOR_VER }}.${{ env.PATCH_VER }}.${{ env.BUILD_VER }}"
git push origin ${{ github.head_ref }}
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ RUN apt-get install -y libpython2.7
RUN apt-get install -y build-essential
RUN apt-get install -y wget
RUN apt-get install -y tree
RUN apt-get install -y zip

# Clear APT cache to reduce image size
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
Expand All @@ -61,13 +62,18 @@ ARG PATCH_VER
ARG BUILD_VER

# Download and extract CCS installation package
RUN wget -q https://software-dl.ti.com/ccs/esd/CCSv${MAJOR_VER}/CCS_${MAJOR_VER}_${MINOR_VER}_${PATCH_VER}/exports/CCS${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}.${BUILD_VER}_linux-x64.tar.gz
RUN tar -zxvf CCS${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}.${BUILD_VER}_linux-x64.tar.gz
RUN wget -q https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-J1VdearkvK/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/CCS_${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}.${BUILD_VER}_linux.zip
RUN unzip CCS_${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}.${BUILD_VER}_linux.zip

ARG COMPONENTS

RUN ls /ccs_install

# Help in case we need it
RUN /ccs_install/CCS_${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}.${BUILD_VER}_linux/ccs_setup_${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}.${BUILD_VER}.run --help

# Install CCS in unattended mode
RUN /ccs_install/CCS${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}.${BUILD_VER}_linux-x64/ccs_setup_${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}.${BUILD_VER}.run --mode unattended --enable-components ${COMPONENTS} --prefix /opt/ti --install-BlackHawk false --install-Segger false
RUN /ccs_install/CCS_${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}.${BUILD_VER}_linux/ccs_setup_${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}.${BUILD_VER}.run --mode unattended --enable-components ${COMPONENTS} --prefix /opt/ti

# Clean up installation directory
RUN rm -r /ccs_install
Expand Down
Loading