Skip to content

Commit

Permalink
CI: add GitHub Actions workflows for building libraries and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirUmek committed May 27, 2024
1 parent dce6d94 commit b8e3bac
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 16 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build_fs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,16 @@ jobs:
working-directory: ./MDK-Middleware/.ci/FileSystem/
run: |
# Create list of used packs - keep pack specification only (remove path/URL)
csolution list packs ./FileSystem.csolution.yml | sed 's/ .*//' > packs.txt
csolution list packs ./Library/Library.csolution.yml 2>/dev/null | sed 's/ .*//' > packs.txt
csolution list packs ./Examples/Examples.csolution.yml 2>/dev/null | sed 's/ .*//' >> packs.txt
# Remove MDK-Middleware from the list
sed -i '/.*MDK-Middleware.*/d' packs.txt
# Keep only leters, numbers, ':', '@', '.', '_' and '-'
sed -i 's/[^a-zA-Z0-9:@._-]//g' packs.txt
# Remove duplicates from the list and create final list
awk '!seen[$0]++' packs.txt | tee pack_list.txt
# Install required packs
cpackget add -a -n -f packs.txt
cpackget add -a -n -f pack_list.txt
- name: Use local MDK-Middleware pack
working-directory: ./MDK-Middleware/
Expand All @@ -74,7 +77,12 @@ jobs:
- name: Build FileSystem sources
working-directory: ./MDK-Middleware/.ci/FileSystem
run: |
cbuild FileSystem.csolution.yml --update-rte --toolchain ${{ matrix.compiler }} 2>&1 | tee build_${{ matrix.compiler }}.log || true
cbuild ./Library/Library.csolution.yml --update-rte --toolchain ${{ matrix.compiler }} 2>&1 | tee build_${{ matrix.compiler }}.log || true
- name: Build FileSystem examples
working-directory: ./MDK-Middleware/.ci/FileSystem
run: |
cbuild ./Examples/Examples.csolution.yml --update-rte --toolchain ${{ matrix.compiler }} 2>&1 | tee -a build_${{ matrix.compiler }}.log || true
- name: Create build summary
working-directory: ./MDK-Middleware/.ci/FileSystem
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/build_net.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,16 @@ jobs:
working-directory: ./MDK-Middleware/.ci/Network/
run: |
# Create list of used packs - keep pack specification only (remove path/URL)
csolution list packs ./Network.csolution.yml | sed 's/ .*//' > packs.txt
csolution list packs ./Library/Library.csolution.yml 2>/dev/null | sed 's/ .*//' > packs.txt
csolution list packs ./Examples/Examples.csolution.yml 2>/dev/null | sed 's/ .*//' >> packs.txt
# Remove MDK-Middleware from the list
sed -i '/.*MDK-Middleware.*/d' packs.txt
# Keep only leters, numbers, ':', '@', '.', '_' and '-'
sed -i 's/[^a-zA-Z0-9:@._-]//g' packs.txt
# Remove duplicates from the list and create final list
awk '!seen[$0]++' packs.txt | tee pack_list.txt
# Install required packs
cpackget add -a -n -f packs.txt
cpackget add -a -n -f pack_list.txt
- name: Use local MDK-Middleware pack
working-directory: ./MDK-Middleware/
Expand All @@ -74,7 +77,12 @@ jobs:
- name: Build Network sources
working-directory: ./MDK-Middleware/.ci/Network
run: |
cbuild Network.csolution.yml --update-rte --toolchain ${{ matrix.compiler }} 2>&1 | tee build_${{ matrix.compiler }}.log || true
cbuild ./Library/Library.csolution.yml --update-rte --toolchain ${{ matrix.compiler }} 2>&1 | tee build_${{ matrix.compiler }}.log || true
- name: Build Network examples
working-directory: ./MDK-Middleware/.ci/Network
run: |
cbuild ./Examples/Examples.csolution.yml --update-rte --toolchain ${{ matrix.compiler }} 2>&1 | tee -a build_${{ matrix.compiler }}.log || true
- name: Create build summary
working-directory: ./MDK-Middleware/.ci/Network
Expand Down
31 changes: 21 additions & 10 deletions .github/workflows/build_usb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,18 @@ jobs:
working-directory: ./MDK-Middleware/.ci/USB/
run: |
# Create list of used packs - keep pack specification only (remove path/URL)
csolution list packs ./Device/USB_Device.csolution.yml | sed 's/ .*//' > packs_usbd.txt
csolution list packs ./Host/USB_Host.csolution.yml | sed 's/ .*//' > packs_usbh.txt
csolution list packs ./Device/Library/Library.csolution.yml 2>/dev/null | sed 's/ .*//' > packs.txt
csolution list packs ./Device/Examples/Examples.csolution.yml 2>/dev/null | sed 's/ .*//' >> packs.txt
csolution list packs ./Host/Library/Library.csolution.yml 2>/dev/null | sed 's/ .*//' >> packs.txt
csolution list packs ./Host/Examples/Examples.csolution.yml 2>/dev/null | sed 's/ .*//' >> packs.txt
# Remove MDK-Middleware from the list
sed -i '/.*MDK-Middleware.*/d' packs_usbd.txt
sed -i '/.*MDK-Middleware.*/d' packs_usbh.txt
sed -i '/.*MDK-Middleware.*/d' packs.txt
# Keep only leters, numbers, ':', '@', '.', '_' and '-'
sed -i 's/[^a-zA-Z0-9:@._-]//g' packs_usbd.txt
sed -i 's/[^a-zA-Z0-9:@._-]//g' packs_usbh.txt
sed -i 's/[^a-zA-Z0-9:@._-]//g' packs.txt
# Remove duplicates from the list and create final list
awk '!seen[$0]++' packs.txt | tee pack_list.txt
# Install required packs
cpackget add -a -n -f packs_usbd.txt
cpackget add -a -n -f packs_usbh.txt
cpackget add -a -n -f pack_list.txt
- name: Use local MDK-Middleware pack
working-directory: ./MDK-Middleware/
Expand All @@ -78,12 +79,22 @@ jobs:
- name: Build USB Device sources
working-directory: ./MDK-Middleware/.ci/USB/Device
run: |
cbuild USB_Device.csolution.yml --update-rte --toolchain ${{ matrix.compiler }} 2>&1 | tee build_usbd_${{ matrix.compiler }}.log || true
cbuild ./Library/Library.csolution.yml --update-rte --toolchain ${{ matrix.compiler }} 2>&1 | tee build_usbd_${{ matrix.compiler }}.log || true
- name: Build USB Device examples
working-directory: ./MDK-Middleware/.ci/USB/Device
run: |
cbuild ./Examples/Examples.csolution.yml --update-rte --toolchain ${{ matrix.compiler }} 2>&1 | tee -a build_usbd_${{ matrix.compiler }}.log || true
- name: Build USB Host sources
working-directory: ./MDK-Middleware/.ci/USB/Host
run: |
cbuild USB_Host.csolution.yml --update-rte --toolchain ${{ matrix.compiler }} 2>&1 | tee build_usbh_${{ matrix.compiler }}.log || true
cbuild ./Library/Library.csolution.yml --update-rte --toolchain ${{ matrix.compiler }} 2>&1 | tee build_usbh_${{ matrix.compiler }}.log || true
- name: Build USB Host examples
working-directory: ./MDK-Middleware/.ci/USB/Host
run: |
cbuild ./Examples/Examples.csolution.yml --update-rte --toolchain ${{ matrix.compiler }} 2>&1 | tee -a build_usbh_${{ matrix.compiler }}.log || true
- name: Create build summary
working-directory: ./MDK-Middleware/.ci/USB
Expand Down

0 comments on commit b8e3bac

Please sign in to comment.