From 074377b67160ac20a34f9de2dc8bcb15514bb6a1 Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Wed, 15 Nov 2023 11:25:49 +0100 Subject: [PATCH] ci: Added Goil build on Cygwin. Signed-off-by: Adrien Ricciardi --- .github/workflows/build-examples.yaml | 48 +++++++++++++++++++-------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-examples.yaml b/.github/workflows/build-examples.yaml index 20b8881b1..80516f072 100644 --- a/.github/workflows/build-examples.yaml +++ b/.github/workflows/build-examples.yaml @@ -6,8 +6,8 @@ env: GOIL: ${{ github.workspace }}/goil/makefile-unix/goil jobs: - goil: - name: Build Goil compiler + goil-linux: + name: Build Goil compiler for Linux runs-on: ubuntu-22.04 steps: - name: Checkout sources @@ -25,10 +25,30 @@ jobs: path: ${{ github.workspace }} key: ${{ env.CACHE_KEY }} + goil-cygwin: + name: Build Goil compiler for Cygwin + runs-on: windows-latest + steps: + - name: Install Cygwin + uses: egor-tensin/setup-cygwin@v4 + with: + packages: gcc-g++ python + - name: Checkout sources + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: Build Goil + shell: C:\tools\cygwin\bin\bash.exe --login -o igncr '{0}' + # Do not use "working-directory:" because it would involve using the github.workspace variable, which is a Windows path incompatible with Bash + run: | + cd $GITHUB_WORKSPACE/goil/makefile-unix + python build.py + raspberry-pi-examples: name: Build Raspberry Pi examples runs-on: ubuntu-22.04 - needs: goil + needs: goil-linux strategy: matrix: # List only the examples that currently compile @@ -53,7 +73,7 @@ jobs: cortex-a-r-spider-examples: name: Build Renesas Spider Cortex-R52 examples runs-on: ubuntu-22.04 - needs: goil + needs: goil-linux env: ARM_TOOLCHAIN_NAME: arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi strategy: @@ -84,7 +104,7 @@ jobs: avr-arduino-uno-examples: name: Build AVR Arduino Uno examples runs-on: ubuntu-22.04 - needs: goil + needs: goil-linux strategy: matrix: example_name: [blink, customCounterExample, extInterrupt, serial, trace] @@ -109,7 +129,7 @@ jobs: avr-arduino-mega-2560-examples: name: Build AVR Arduino Mega 2560 examples runs-on: ubuntu-22.04 - needs: goil + needs: goil-linux strategy: matrix: example_name: [blink, extInterrupt, serial] @@ -133,7 +153,7 @@ jobs: posix-examples: name: Build POSIX examples runs-on: ubuntu-22.04 - needs: goil + needs: goil-linux strategy: matrix: example_name: [can_demo, events, ioc, isr, messages, one_task, periodic, trace_test] @@ -153,7 +173,7 @@ jobs: cortex-m-arduino-m0-examples: name: Build Cortex-M Arduino M0 examples runs-on: ubuntu-22.04 - needs: goil + needs: goil-linux strategy: matrix: example_name: [blink] @@ -177,7 +197,7 @@ jobs: cortex-m-xplained-pro-examples: name: Build Cortex-M Xplained Pro examples runs-on: ubuntu-22.04 - needs: goil + needs: goil-linux strategy: matrix: example_name: [blink, readbutton, readbutton_isr] @@ -201,7 +221,7 @@ jobs: cortex-m-arduino-due-examples: name: Build Cortex-M Arduino Due examples runs-on: ubuntu-22.04 - needs: goil + needs: goil-linux strategy: matrix: example_name: [blink] @@ -225,7 +245,7 @@ jobs: cortex-m-smart-fusion-2-examples: name: Build Cortex-M SmartFusion2 examples runs-on: ubuntu-22.04 - needs: goil + needs: goil-linux strategy: matrix: # List only the examples that currently compile @@ -250,7 +270,7 @@ jobs: cortex-m-smart-nucleo-f303-examples: name: Build Cortex-M Nucleo-F303 examples runs-on: ubuntu-22.04 - needs: goil + needs: goil-linux strategy: matrix: # List only the examples that currently compile @@ -275,7 +295,7 @@ jobs: cortex-m-smart-nucleo-l432-examples: name: Build Cortex-M Nucleo-F432 examples runs-on: ubuntu-22.04 - needs: goil + needs: goil-linux strategy: matrix: # List only the examples that currently compile @@ -300,7 +320,7 @@ jobs: cortex-m-smart-stm32f4discovery-examples: name: Build Cortex-M STM32F4DISCOVERY examples runs-on: ubuntu-22.04 - needs: goil + needs: goil-linux strategy: matrix: # List only the examples that currently compile