From cd0b3b4eb9ccf33c2638a33ee03438e97187982a Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Wed, 18 Jan 2023 16:10:58 -0500 Subject: [PATCH 01/13] Separate out steps to individual jobs --- .github/workflows/os-check.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index 8acf5dd18..cbde7e4bb 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -4,30 +4,33 @@ concurrency: on: push: - branches: [ 'master', 'main', 'release/**' ] + branches: [ '*' ] +# branches: [ 'master', 'main', 'release/**' ] pull_request: branches: [ '*' ] jobs: - macos_build: + macos_base: name: macOS Build Test runs-on: macos-latest steps: - uses: actions/checkout@v3 - - name: brew run: brew install automake libtool - - name: autogen run: ./autogen.sh + macos_test1: + uses: macos_base + steps: - name: configure make check run: | ./configure make make check make distcheck - + macos_test2: + uses: macos_base - name: configure all make check run: | ./configure --enable-all @@ -35,6 +38,8 @@ jobs: make check make distcheck + macos_test3: + uses: macos_base - name: configure all ASN template run: | ./configure --enable-all --enable-asn=template @@ -42,6 +47,8 @@ jobs: make check make distcheck + macos_test4: + uses: macos_base - name: make user_settings_all.h run: | cp ./examples/configs/user_settings_all.h user_settings.h @@ -49,6 +56,8 @@ jobs: make make check + macos_test5: + uses: macos_base - name: user_settings_all.h with compatibility layer run: | cp ./examples/configs/user_settings_all.h user_settings.h @@ -57,6 +66,8 @@ jobs: make make check + macos_test6: + uses: macos_base - name: user_settings_min_ecc.h run: | cp ./examples/configs/user_settings_min_ecc.h user_settings.h @@ -64,6 +75,8 @@ jobs: make ./wolfcrypt/test/testwolfcrypt + macos_test7: + uses: macos_base - name: user_settings_wolfboot_keytools.h run: | cp ./examples/configs/user_settings_wolfboot_keytools.h user_settings.h From 6ac09b5c66362d036bc42568b9e8223fc3550bd6 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Wed, 18 Jan 2023 16:12:54 -0500 Subject: [PATCH 02/13] Fix spacing --- .github/workflows/os-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index cbde7e4bb..5e4eafaf9 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -29,6 +29,7 @@ jobs: make make check make distcheck + macos_test2: uses: macos_base - name: configure all make check From ffee4edcf5bca4ee6fc73113dc48e06c2ddfb63f Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Wed, 18 Jan 2023 16:22:06 -0500 Subject: [PATCH 03/13] Fix dependency command --- .github/workflows/os-check.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index 5e4eafaf9..3c5f4d16e 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -21,7 +21,7 @@ jobs: run: ./autogen.sh macos_test1: - uses: macos_base + needs: macos_base steps: - name: configure make check run: | @@ -31,7 +31,7 @@ jobs: make distcheck macos_test2: - uses: macos_base + needs: macos_base - name: configure all make check run: | ./configure --enable-all @@ -40,7 +40,7 @@ jobs: make distcheck macos_test3: - uses: macos_base + needs: macos_base - name: configure all ASN template run: | ./configure --enable-all --enable-asn=template @@ -49,7 +49,7 @@ jobs: make distcheck macos_test4: - uses: macos_base + needs: macos_base - name: make user_settings_all.h run: | cp ./examples/configs/user_settings_all.h user_settings.h @@ -58,7 +58,7 @@ jobs: make check macos_test5: - uses: macos_base + needs: macos_base - name: user_settings_all.h with compatibility layer run: | cp ./examples/configs/user_settings_all.h user_settings.h @@ -68,7 +68,7 @@ jobs: make check macos_test6: - uses: macos_base + needs: macos_base - name: user_settings_min_ecc.h run: | cp ./examples/configs/user_settings_min_ecc.h user_settings.h @@ -77,7 +77,7 @@ jobs: ./wolfcrypt/test/testwolfcrypt macos_test7: - uses: macos_base + needs: macos_base - name: user_settings_wolfboot_keytools.h run: | cp ./examples/configs/user_settings_wolfboot_keytools.h user_settings.h From 0d73074718811e2eb85096b0bcfcfb3c4675036a Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Wed, 18 Jan 2023 17:00:47 -0500 Subject: [PATCH 04/13] Missing keyword --- .github/workflows/os-check.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index 3c5f4d16e..a8d940662 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -32,6 +32,7 @@ jobs: macos_test2: needs: macos_base + steps: - name: configure all make check run: | ./configure --enable-all @@ -41,6 +42,7 @@ jobs: macos_test3: needs: macos_base + steps: - name: configure all ASN template run: | ./configure --enable-all --enable-asn=template @@ -59,6 +61,7 @@ jobs: macos_test5: needs: macos_base + steps: - name: user_settings_all.h with compatibility layer run: | cp ./examples/configs/user_settings_all.h user_settings.h @@ -69,6 +72,7 @@ jobs: macos_test6: needs: macos_base + steps: - name: user_settings_min_ecc.h run: | cp ./examples/configs/user_settings_min_ecc.h user_settings.h @@ -78,6 +82,7 @@ jobs: macos_test7: needs: macos_base + steps: - name: user_settings_wolfboot_keytools.h run: | cp ./examples/configs/user_settings_wolfboot_keytools.h user_settings.h From caa7c9e8b51bb0e2a0e5f6a79a4f4d4a6fc38b75 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Wed, 18 Jan 2023 17:07:36 -0500 Subject: [PATCH 05/13] One more missing keyword --- .github/workflows/os-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index a8d940662..05c64b829 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -52,6 +52,7 @@ jobs: macos_test4: needs: macos_base + steps: - name: make user_settings_all.h run: | cp ./examples/configs/user_settings_all.h user_settings.h From bb88c8fbfad53b4f8c2dedf8f0c1f3be5e5ac6d3 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Wed, 18 Jan 2023 17:13:08 -0500 Subject: [PATCH 06/13] Add in 'runs-on' --- .github/workflows/os-check.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index 05c64b829..78cdb28a8 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -22,6 +22,7 @@ jobs: macos_test1: needs: macos_base + runs-on: macos-latest steps: - name: configure make check run: | @@ -32,6 +33,7 @@ jobs: macos_test2: needs: macos_base + runs-on: macos-latest steps: - name: configure all make check run: | @@ -42,6 +44,7 @@ jobs: macos_test3: needs: macos_base + runs-on: macos-latest steps: - name: configure all ASN template run: | @@ -52,6 +55,7 @@ jobs: macos_test4: needs: macos_base + runs-on: macos-latest steps: - name: make user_settings_all.h run: | @@ -62,6 +66,7 @@ jobs: macos_test5: needs: macos_base + runs-on: macos-latest steps: - name: user_settings_all.h with compatibility layer run: | @@ -73,6 +78,7 @@ jobs: macos_test6: needs: macos_base + runs-on: macos-latest steps: - name: user_settings_min_ecc.h run: | @@ -83,6 +89,7 @@ jobs: macos_test7: needs: macos_base + runs-on: macos-latest steps: - name: user_settings_wolfboot_keytools.h run: | From 283ebd5afeffcb77778488422b3ecc1e47f23338 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Wed, 18 Jan 2023 17:17:15 -0500 Subject: [PATCH 07/13] Remove base job --- .github/workflows/os-check.yml | 38 +++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index 78cdb28a8..c7bff385a 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -10,20 +10,12 @@ on: branches: [ '*' ] jobs: - macos_base: - name: macOS Build Test + macos_test1: runs-on: macos-latest steps: - uses: actions/checkout@v3 - - name: brew - run: brew install automake libtool - - name: autogen - run: ./autogen.sh - - macos_test1: - needs: macos_base - runs-on: macos-latest - steps: + - run: brew install automake libtool + - run: ./autogen.sh - name: configure make check run: | ./configure @@ -32,9 +24,11 @@ jobs: make distcheck macos_test2: - needs: macos_base runs-on: macos-latest steps: + - uses: actions/checkout@v3 + - run: brew install automake libtool + - run: ./autogen.sh - name: configure all make check run: | ./configure --enable-all @@ -43,9 +37,11 @@ jobs: make distcheck macos_test3: - needs: macos_base runs-on: macos-latest steps: + - uses: actions/checkout@v3 + - run: brew install automake libtool + - run: ./autogen.sh - name: configure all ASN template run: | ./configure --enable-all --enable-asn=template @@ -54,9 +50,11 @@ jobs: make distcheck macos_test4: - needs: macos_base runs-on: macos-latest steps: + - uses: actions/checkout@v3 + - run: brew install automake libtool + - run: ./autogen.sh - name: make user_settings_all.h run: | cp ./examples/configs/user_settings_all.h user_settings.h @@ -65,9 +63,11 @@ jobs: make check macos_test5: - needs: macos_base runs-on: macos-latest steps: + - uses: actions/checkout@v3 + - run: brew install automake libtool + - run: ./autogen.sh - name: user_settings_all.h with compatibility layer run: | cp ./examples/configs/user_settings_all.h user_settings.h @@ -77,9 +77,11 @@ jobs: make check macos_test6: - needs: macos_base runs-on: macos-latest steps: + - uses: actions/checkout@v3 + - run: brew install automake libtool + - run: ./autogen.sh - name: user_settings_min_ecc.h run: | cp ./examples/configs/user_settings_min_ecc.h user_settings.h @@ -88,9 +90,11 @@ jobs: ./wolfcrypt/test/testwolfcrypt macos_test7: - needs: macos_base runs-on: macos-latest steps: + - uses: actions/checkout@v3 + - run: brew install automake libtool + - run: ./autogen.sh - name: user_settings_wolfboot_keytools.h run: | cp ./examples/configs/user_settings_wolfboot_keytools.h user_settings.h From cb601bdf6494d24539d27727561b191d31940c25 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Thu, 19 Jan 2023 09:33:26 -0500 Subject: [PATCH 08/13] Combine ubuntu and macos tests to ensure the same thing is run --- .github/workflows/os-check.yml | 137 ++++++++++++++------------------- 1 file changed, 56 insertions(+), 81 deletions(-) diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index c7bff385a..006d5d6e9 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -10,11 +10,16 @@ on: branches: [ '*' ] jobs: - macos_test1: - runs-on: macos-latest + make_check: + strategy: + matrix: + os: [ ubunut-latest, macos-latest ] + name: make_check on ${{ matrix.os }} + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - run: brew install automake libtool + - if: ${{ matrix.os == 'macos-latest' }} + run: brew install automake libtool - run: ./autogen.sh - name: configure make check run: | @@ -23,11 +28,16 @@ jobs: make check make distcheck - macos_test2: - runs-on: macos-latest + make_check_enable_all: + strategy: + matrix: + os: [ ubunut-latest, macos-latest ] + name: make_check_enable_all on ${{ matrix.os }} + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - run: brew install automake libtool + - if: ${{ matrix.os == 'macos-latest' }} + run: brew install automake libtool - run: ./autogen.sh - name: configure all make check run: | @@ -36,11 +46,16 @@ jobs: make check make distcheck - macos_test3: - runs-on: macos-latest + make_check_enable_all_asn: + strategy: + matrix: + os: [ ubunut-latest, macos-latest ] + name: make_check_enable_all_asn on ${{ matrix.os }} + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - run: brew install automake libtool + - if: ${{ matrix.os == 'macos-latest' }} + run: brew install automake libtool - run: ./autogen.sh - name: configure all ASN template run: | @@ -49,11 +64,16 @@ jobs: make check make distcheck - macos_test4: - runs-on: macos-latest + make_user: + strategy: + matrix: + os: [ ubunut-latest, macos-latest ] + name: make_user on ${{ matrix.os }} + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - run: brew install automake libtool + - if: ${{ matrix.os == 'macos-latest' }} + run: brew install automake libtool - run: ./autogen.sh - name: make user_settings_all.h run: | @@ -62,11 +82,16 @@ jobs: make make check - macos_test5: - runs-on: macos-latest + make_user_all: + strategy: + matrix: + os: [ ubunut-latest, macos-latest ] + name: make_user_all on ${{ matrix.os }} + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - run: brew install automake libtool + - if: ${{ matrix.os == 'macos-latest' }} + run: brew install automake libtool - run: ./autogen.sh - name: user_settings_all.h with compatibility layer run: | @@ -76,11 +101,16 @@ jobs: make make check - macos_test6: - runs-on: macos-latest + make_user_minecc: + strategy: + matrix: + os: [ ubunut-latest, macos-latest ] + name: make_user_minecc on ${{ matrix.os }} + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - run: brew install automake libtool + - if: ${{ matrix.os == 'macos-latest' }} + run: brew install automake libtool - run: ./autogen.sh - name: user_settings_min_ecc.h run: | @@ -89,11 +119,16 @@ jobs: make ./wolfcrypt/test/testwolfcrypt - macos_test7: - runs-on: macos-latest + make_user_wolfboot: + strategy: + matrix: + os: [ ubunut-latest, macos-latest ] + name: make_user_wolfboot on ${{ matrix.os }} + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - run: brew install automake libtool + - if: ${{ matrix.os == 'macos-latest' }} + run: brew install automake libtool - run: ./autogen.sh - name: user_settings_wolfboot_keytools.h run: | @@ -102,65 +137,6 @@ jobs: make ./wolfcrypt/test/testwolfcrypt - ubuntu_build: - name: Ubuntu Build Test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: autogen - run: ./autogen.sh - - - name: configure make check - run: | - ./configure - make - make check - make distcheck - - - name: configure all make check - run: | - ./configure --enable-all - make - make check - make distcheck - - - name: configure all ASN template - run: | - ./configure --enable-all --enable-asn=template - make - make check - make distcheck - - - name: make user_settings_all.h - run: | - cp ./examples/configs/user_settings_all.h user_settings.h - ./configure --enable-usersettings - make - make check - - - name: user_settings_all.h with compatibility layer - run: | - cp ./examples/configs/user_settings_all.h user_settings.h - sed -i -e "s/if 0/if 1/" user_settings.h - ./configure --enable-usersettings - make - make check - - - name: user_settings_min_ecc.h - run: | - cp ./examples/configs/user_settings_min_ecc.h user_settings.h - ./configure --enable-usersettings --disable-examples - make - ./wolfcrypt/test/testwolfcrypt - - - name: user_settings_wolfboot_keytools.h - run: | - cp ./examples/configs/user_settings_wolfboot_keytools.h user_settings.h - ./configure --enable-usersettings --disable-examples - make - ./wolfcrypt/test/testwolfcrypt - windows_build: name: Windows Build Test runs-on: windows-latest @@ -188,4 +164,3 @@ jobs: # Add additional options to the MSBuild command line here (like platform or verbosity level). # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{env.BUILD_PLATFORM}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} - From b1f423be3899114b57e23f05e4251eb0aba253b3 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Thu, 19 Jan 2023 09:41:18 -0500 Subject: [PATCH 09/13] Kill off previous run if another commit happens --- .github/workflows/os-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index 006d5d6e9..26eb1b204 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -1,6 +1,7 @@ name: GitHub Action Tests concurrency: group: ${{ github.ref }} + cancel-in-progress: true on: push: From 4d5dbe9b90fbf302a7d58fec1a817898ad8322bc Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Thu, 19 Jan 2023 09:44:38 -0500 Subject: [PATCH 10/13] Give a better name to the workflow --- .github/workflows/os-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index 26eb1b204..63bcbeda3 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -1,4 +1,4 @@ -name: GitHub Action Tests +name: Ubuntu-Macos-Windows Tests concurrency: group: ${{ github.ref }} cancel-in-progress: true From ac8951c4e228f818a9e05efea4d9d199582ef9fc Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Thu, 19 Jan 2023 09:54:20 -0500 Subject: [PATCH 11/13] Fix typo --- .github/workflows/os-check.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index 63bcbeda3..55cb809e1 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -14,7 +14,7 @@ jobs: make_check: strategy: matrix: - os: [ ubunut-latest, macos-latest ] + os: [ ubuntu-latest, macos-latest ] name: make_check on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: @@ -32,7 +32,7 @@ jobs: make_check_enable_all: strategy: matrix: - os: [ ubunut-latest, macos-latest ] + os: [ ubuntu-latest, macos-latest ] name: make_check_enable_all on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: @@ -50,7 +50,7 @@ jobs: make_check_enable_all_asn: strategy: matrix: - os: [ ubunut-latest, macos-latest ] + os: [ ubuntu-latest, macos-latest ] name: make_check_enable_all_asn on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: @@ -68,7 +68,7 @@ jobs: make_user: strategy: matrix: - os: [ ubunut-latest, macos-latest ] + os: [ ubuntu-latest, macos-latest ] name: make_user on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: @@ -86,7 +86,7 @@ jobs: make_user_all: strategy: matrix: - os: [ ubunut-latest, macos-latest ] + os: [ ubuntu-latest, macos-latest ] name: make_user_all on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: @@ -105,7 +105,7 @@ jobs: make_user_minecc: strategy: matrix: - os: [ ubunut-latest, macos-latest ] + os: [ ubuntu-latest, macos-latest ] name: make_user_minecc on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: @@ -123,7 +123,7 @@ jobs: make_user_wolfboot: strategy: matrix: - os: [ ubunut-latest, macos-latest ] + os: [ ubuntu-latest, macos-latest ] name: make_user_wolfboot on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: From d955768744eb27872ba239af1e46028bb04a9226 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Thu, 19 Jan 2023 10:03:26 -0500 Subject: [PATCH 12/13] Only run on important branches --- .github/workflows/os-check.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index 55cb809e1..ae3375908 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -5,8 +5,7 @@ concurrency: on: push: - branches: [ '*' ] -# branches: [ 'master', 'main', 'release/**' ] + branches: [ 'master', 'main', 'release/**' ] pull_request: branches: [ '*' ] From 2276fca0f494ba3910d710216bffa4c36971d802 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Thu, 19 Jan 2023 10:12:08 -0500 Subject: [PATCH 13/13] Cancel runs on subsequent push to PR but not to branches --- .github/workflows/docker-Espressif.yml | 3 ++- .github/workflows/os-check.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-Espressif.yml b/.github/workflows/docker-Espressif.yml index 98d0e0ffd..be2c2755a 100644 --- a/.github/workflows/docker-Espressif.yml +++ b/.github/workflows/docker-Espressif.yml @@ -1,6 +1,7 @@ name: Test Espressif examples on various official Docker containers concurrency: - group: ${{ github.ref }} + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true on: push: diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index ae3375908..23a7fb038 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -1,6 +1,6 @@ name: Ubuntu-Macos-Windows Tests concurrency: - group: ${{ github.ref }} + group: ${{ github.head_ref || github.run_id }} cancel-in-progress: true on: