chore 📦: Update SDCC build process

- This commit updates the SDCC build process with various minor changes.
This commit is contained in:
2025-02-23 10:32:03 +01:00
parent 2317f458b6
commit 4d87e095e9

View File

@@ -11,53 +11,53 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest # Runs on the latest Ubuntu version available runs-on: ubuntu-latest # Runs on the latest Ubuntu version available
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
github-server-url: ${{ vars.GIT_SERVER_URL }} github-server-url: ${{ vars.GIT_SERVER_URL }}
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y build-essential libgmp-dev libmpfr-dev libncurses-dev git subversion bison flex sudo apt-get install -y build-essential libgmp-dev libmpfr-dev libncurses-dev git subversion bison flex libboost-graph-dev gcc pyhton
# - name: Clone SDCC repository # - name: Clone SDCC repository
# run: | # run: |
# git clone https://github.com/sdcc-team/sdcc.git # git clone https://github.com/sdcc-team/sdcc.git
# cd sdcc # cd sdcc
- name: Checkout SDCC using SVN - name: Checkout SDCC using SVN
run: | run: |
# Use SVN to checkout SDCC at a specific revision # Use SVN to checkout SDCC at a specific revision
# svn co -r [rev] svn://svn.code.sf.net/p/sdcc/code/trunk/sdcc # svn co -r [rev] svn://svn.code.sf.net/p/sdcc/code/trunk/sdcc
svn co -r 9092 svn://svn.code.sf.net/p/sdcc/code/trunk/sdcc svn co -r 9092 svn://svn.code.sf.net/p/sdcc/code/trunk/sdcc
- name: Build SDCC - name: Build SDCC
run: | run: |
cd sdcc cd sdcc
./configure --target=8051 --with-arch=8051 --prefix=/usr/local ./configure --target=8051 --with-arch=8051 --prefix=/usr/local
make make
sudo make install sudo make install
- name: Verify SDCC installation - name: Verify SDCC installation
run: | run: |
sdcc --version # Verifies if SDCC was installed successfully sdcc --version # Verifies if SDCC was installed successfully
- name: Compile using Makefile - name: Compile using Makefile
run: | run: |
cd $GITHUB_WORKSPACE # Navigate to the root of your repo (where the Makefile is located) cd $GITHUB_WORKSPACE # Navigate to the root of your repo (where the Makefile is located)
make # Run the make command to build the project using the Makefile make # Run the make command to build the project using the Makefile
# - name: Upload compiled hex file # - name: Upload compiled hex file
# uses: actions/upload-artifact@v2 # uses: actions/upload-artifact@v2
# with: # with:
# name: cc2530-firmware # name: cc2530-firmware
# path: output.ihx # Replace with the actual output file name if different (e.g., .ihx) # path: output.ihx # Replace with the actual output file name if different (e.g., .ihx)
- name: Clean up compiled files - name: Clean up compiled files
run: | run: |
cd $GITHUB_WORKSPACE # Navigate back to the project directory cd $GITHUB_WORKSPACE # Navigate back to the project directory
make clean # Run the 'make clean' command to delete the compiled files make clean # Run the 'make clean' command to delete the compiled files