Update Makefile for patch usage #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build MSP430 Project | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# use cache for now instead of custom docker image since it's easier | |
- name: Set Up Cache for MSP430-GCC | |
id: cache-msp430 | |
uses: actions/cache@v3 | |
with: | |
path: /home/runner/msp430-gcc | |
key: msp430-gcc | |
restore-keys: | | |
msp430-gcc | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y p7zip-full srecord | |
- name: Install MSP430-GCC | |
if: steps.cache-msp430.outputs.cache-hit != 'true' | |
run: | | |
# Download the .7z archive | |
wget https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-full-linux-x64-installer-9.3.1.2.7z | |
# Extract the installer | |
7z x msp430-gcc-full-linux-x64-installer-9.3.1.2.7z | |
# Make the installer executable | |
chmod +x msp430-gcc-full-linux-x64-installer-9.3.1.2.run | |
sudo ./msp430-gcc-full-linux-x64-installer-9.3.1.2.run --mode unattended --prefix /home/runner/msp430-gcc | |
# Adjust permissions of the installation directory | |
sudo chmod -R a+rX /home/runner/msp430-gcc | |
- name: Add MSP430-GCC to PATH | |
run: echo "/home/runner/msp430-gcc/bin" >> $GITHUB_PATH | |
- name: Build Project | |
run: make | |
- name: Upload Output Files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Output Files | |
path: | | |
**/*.txt | |
**/*.hex |