Skip to content

Commit 93fc451

Browse files
add compile time test with xc32 compiler
1 parent 5fb496b commit 93fc451

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/xc32-sftp.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: XC32 Build
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
9+
jobs:
10+
wolfssh-xc32:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout app repository
14+
uses: actions/checkout@v3
15+
with:
16+
repository: JacobBarthelmeh/net_apps_sam_e70_v71
17+
ref: sftp_server
18+
path: net_apps_sam_e70_v71
19+
20+
- name: Set up environment
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y libcurl4-openssl-dev libarchive-dev libelf-dev
24+
25+
# Cache XC32 compiler installer
26+
- name: Cache XC32 compiler installer
27+
id: cache-xc32
28+
uses: actions/cache@v3
29+
with:
30+
path: /tmp/xc32.run
31+
key: ${{ runner.os }}-xc32-installer
32+
33+
- name: Download XC32 compiler
34+
if: steps.cache-xc32.outputs.cache-hit != 'true'
35+
run: |
36+
echo "Downloading XC32 compiler..."
37+
curl -fSL -A "Mozilla/4.0" -o /tmp/xc32.run "https://ww1.microchip.com/downloads/aemDocuments/documents/DEV/ProductDocuments/SoftwareTools/xc32-v4.60-full-install-linux-x64-installer.run"
38+
39+
- name: Setup XC32 compiler
40+
run: |
41+
chmod a+x /tmp/xc32.run
42+
echo "Installing XC32 compiler..."
43+
sudo /tmp/xc32.run --mode unattended --unattendedmodeui none --netservername localhost --LicenseType FreeMode --prefix /opt/microchip/xc32
44+
# Add compiler to PATH
45+
echo "PATH=$PATH:/opt/microchip/xc32/v4.60/bin" >> $GITHUB_ENV
46+
47+
- uses: actions/checkout@v4
48+
with:
49+
path: wolfssh/
50+
51+
- name: Replace wolfssh source code
52+
run: |
53+
# Remove existing wolfssh directory if it exists
54+
if [ -d "net_apps_sam_e70_v71/apps/wolfssh_sftp_server_freertos/firmware/src/third_party/wolfssh" ]; then
55+
rm -rf net_apps_sam_e70_v71/apps/wolfssh_sftp_server_freertos/firmware/src/third_party/wolfssh
56+
fi
57+
# Copy the PR wolfssh code
58+
mkdir -p net_apps_sam_e70_v71/apps/wolfssh_sftp_server_freertos/firmware/src/third_party/wolfssh
59+
cp -R wolfssh/* net_apps_sam_e70_v71/apps/wolfssh_sftp_server_freertos/firmware/src/third_party/wolfssh/
60+
echo "Replaced wolfssh source code with current PR's source code"
61+
62+
- name: Compile the project
63+
working-directory: net_apps_sam_e70_v71/apps/wolfssh_sftp_server_freertos/firmware/wolfssh_sftp_server_freertos.X
64+
run: make

0 commit comments

Comments
 (0)