From e7a5ac923c7988e8d899ed3160dba5b5f9cbc0d3 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 03:26:21 +0200 Subject: [PATCH 01/23] Add a CI workflow for the toolchain and SDK --- .github/workflows/main.yml | 64 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..93e57372 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,64 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-toolchain: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + # we don't need submodules for building the toolchain + + # toolchain takes ~40min to build, so we want to avoid that whenever possible! + - uses: actions/cache@v2 + id: toolchain-cache + with: + path: ndless-sdk/toolchain/install + # gcc/binutils/etc versions are in build_toolchain.sh, so that'll be part of our cache key + key: ${{ runner.os }}-${{ hashFiles('ndless-sdk/toolchain/build_toolchain.sh') }} + - name: Install dependencies + if: steps.toolchain-cache.outputs.cache-hit != 'true' + run: sudo apt install -y libmpfr-dev libmpc-dev + - name: Build + if: steps.toolchain-cache.outputs.cache-hit != 'true' + working-directory: ndless-sdk/toolchain + run: ./build_toolchain.sh + + - name: Upload built toolchain + uses: actions/upload-artifact@v2 + with: + name: toolchain + path: ndless-sdk/toolchain/install + build-sdk: + needs: build-toolchain + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: 'recursive' + fetch-depth: 0 # submodule checkout does not work with depth=1 (the default) + + - name: Download built toolchain + uses: actions/download-artifact@v2 + with: + name: toolchain + path: ndless-sdk/toolchain/install + - name: Set up PATH + run: | + echo "::add-path::$GITHUB_WORKSPACE/ndless-sdk/toolchain/install/bin" + echo "::add-path::$GITHUB_WORKSPACE/ndless-sdk/bin" + - name: Install dependencies + run: sudo apt install -y libboost-program-options-dev + - name: Build + run: make From 81a887f6404c92e999e757cb7b8bec9ebb0b49a3 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 15:03:04 +0200 Subject: [PATCH 02/23] CI: fix toolchain permissions --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93e57372..38a80119 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,6 +54,9 @@ jobs: with: name: toolchain path: ndless-sdk/toolchain/install + # necessary because +x isn't retained in the artifact + - name: Fix toolchain permissions + run: chmod +x ndless-sdk/toolchain/install/bin/* - name: Set up PATH run: | echo "::add-path::$GITHUB_WORKSPACE/ndless-sdk/toolchain/install/bin" From 7b7541f366cf0fd32a14beef097497417703fe14 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 15:12:50 +0200 Subject: [PATCH 03/23] CI: use tar to accelerate artifacts --- .github/workflows/main.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38a80119..a39e04ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,12 +33,15 @@ jobs: if: steps.toolchain-cache.outputs.cache-hit != 'true' working-directory: ndless-sdk/toolchain run: ./build_toolchain.sh + - name: Package toolchain + if: steps.toolchain-cache.outputs.cache-hit != 'true' + run: tar -cvf toolchain.tar ndless-sdk/toolchain/install - name: Upload built toolchain uses: actions/upload-artifact@v2 with: name: toolchain - path: ndless-sdk/toolchain/install + path: toolchain.tar build-sdk: needs: build-toolchain runs-on: ubuntu-latest @@ -53,10 +56,9 @@ jobs: uses: actions/download-artifact@v2 with: name: toolchain - path: ndless-sdk/toolchain/install - # necessary because +x isn't retained in the artifact - - name: Fix toolchain permissions - run: chmod +x ndless-sdk/toolchain/install/bin/* + path: toolchain.tar + - name: Extract toolchain + run: tar -xvf toolchain.tar ndless-sdk/toolchain/install - name: Set up PATH run: | echo "::add-path::$GITHUB_WORKSPACE/ndless-sdk/toolchain/install/bin" From 6f268d549de7f3971f33de56e264cffae3db9ae9 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 15:14:55 +0200 Subject: [PATCH 04/23] CI: temporarily force packaging the toolchain, and gz it --- .github/workflows/main.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a39e04ee..4f18dc0b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/cache@v2 id: toolchain-cache with: - path: ndless-sdk/toolchain/install + path: toolchain.tar.gz # gcc/binutils/etc versions are in build_toolchain.sh, so that'll be part of our cache key key: ${{ runner.os }}-${{ hashFiles('ndless-sdk/toolchain/build_toolchain.sh') }} - name: Install dependencies @@ -34,8 +34,7 @@ jobs: working-directory: ndless-sdk/toolchain run: ./build_toolchain.sh - name: Package toolchain - if: steps.toolchain-cache.outputs.cache-hit != 'true' - run: tar -cvf toolchain.tar ndless-sdk/toolchain/install + run: tar -cvzf toolchain.tar.gz ndless-sdk/toolchain/install - name: Upload built toolchain uses: actions/upload-artifact@v2 @@ -58,7 +57,7 @@ jobs: name: toolchain path: toolchain.tar - name: Extract toolchain - run: tar -xvf toolchain.tar ndless-sdk/toolchain/install + run: tar -xvzf toolchain.tar.gz ndless-sdk/toolchain/install - name: Set up PATH run: | echo "::add-path::$GITHUB_WORKSPACE/ndless-sdk/toolchain/install/bin" From bdbc74404aff3f805142481bb6c7c3c019549807 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 15:16:39 +0200 Subject: [PATCH 05/23] CI: skip packaging again if there's a cache --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4f18dc0b..c4fe4dd5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,6 +34,7 @@ jobs: working-directory: ndless-sdk/toolchain run: ./build_toolchain.sh - name: Package toolchain + if: steps.toolchain-cache.outputs.cache-hit != 'true' run: tar -cvzf toolchain.tar.gz ndless-sdk/toolchain/install - name: Upload built toolchain From d9730bf1c125606289634ec2b332ebf641d59cab Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 15:59:54 +0200 Subject: [PATCH 06/23] CI: fix paths --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c4fe4dd5..b160a966 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: toolchain - path: toolchain.tar + path: toolchain.tar.gz build-sdk: needs: build-toolchain runs-on: ubuntu-latest @@ -56,7 +56,7 @@ jobs: uses: actions/download-artifact@v2 with: name: toolchain - path: toolchain.tar + path: toolchain.tar.gz - name: Extract toolchain run: tar -xvzf toolchain.tar.gz ndless-sdk/toolchain/install - name: Set up PATH From 084d251c3f3e5ab51c7265461dba91275d1ef006 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 16:09:52 +0200 Subject: [PATCH 07/23] CI: fix artifact download path --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b160a966..360e856d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,7 +56,6 @@ jobs: uses: actions/download-artifact@v2 with: name: toolchain - path: toolchain.tar.gz - name: Extract toolchain run: tar -xvzf toolchain.tar.gz ndless-sdk/toolchain/install - name: Set up PATH From 3727203bfb421e2acd65603ba086242861fa118b Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 16:17:59 +0200 Subject: [PATCH 08/23] CI: minor formatting --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 360e856d..4ecf2a0c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,3 @@ -# This is a basic workflow to help you get started with Actions - name: CI # Controls when the action will run. Triggers the workflow on push or pull request @@ -45,6 +43,7 @@ jobs: build-sdk: needs: build-toolchain runs-on: ubuntu-latest + steps: - name: Checkout uses: actions/checkout@v2 From ade4707fecba5546753ee7e57dcc83bba6265bae Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 16:29:30 +0200 Subject: [PATCH 09/23] CI: expand SDK build to more OSs macOS failure is expected at this time, see https://github.com/ndless-nspire/Ndless/pull/200#issuecomment-649155030 --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ecf2a0c..dc63e04e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,7 +42,11 @@ jobs: path: toolchain.tar.gz build-sdk: needs: build-toolchain - runs-on: ubuntu-latest + + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-16.04, ubuntu-18.04, macos-10.15] steps: - name: Checkout From e223fba7e095f12a78a5d8cf9a3139f1bbc63a4e Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 16:35:55 +0200 Subject: [PATCH 10/23] CI: remove macOS for now more steps (including a separate toolchain build for macOS) are needed for this --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dc63e04e..5c026bfe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,7 +46,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-16.04, ubuntu-18.04, macos-10.15] + os: [ubuntu-16.04, ubuntu-18.04] steps: - name: Checkout From 94594a4af037d070033e3a1176fbece2f0974b01 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 18:05:11 +0200 Subject: [PATCH 11/23] CI: install necessary dependencies --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5c026bfe..5556aa4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -66,6 +66,6 @@ jobs: echo "::add-path::$GITHUB_WORKSPACE/ndless-sdk/toolchain/install/bin" echo "::add-path::$GITHUB_WORKSPACE/ndless-sdk/bin" - name: Install dependencies - run: sudo apt install -y libboost-program-options-dev + run: sudo apt install -y libboost-program-options-dev libmpfr-dev libmpc-dev - name: Build run: make From 201f0041b77be03e2b9f5ec7df548b710503dff6 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 18:25:59 +0200 Subject: [PATCH 12/23] CI: separate toolchain for each OS --- .github/workflows/main.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5556aa4c..7bcb401f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,10 @@ on: jobs: build-toolchain: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-16.04, ubuntu-18.04] steps: - name: Checkout @@ -38,7 +41,7 @@ jobs: - name: Upload built toolchain uses: actions/upload-artifact@v2 with: - name: toolchain + name: toolchain-${{ runner.os }} path: toolchain.tar.gz build-sdk: needs: build-toolchain @@ -58,7 +61,7 @@ jobs: - name: Download built toolchain uses: actions/download-artifact@v2 with: - name: toolchain + name: toolchain-${{ runner.os }} - name: Extract toolchain run: tar -xvzf toolchain.tar.gz ndless-sdk/toolchain/install - name: Set up PATH From e050dd8a3c9efe13db5e59604655cea643230399 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 18:27:41 +0200 Subject: [PATCH 13/23] CI: add Ubuntu 20.04 --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7bcb401f..53e558a9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-16.04, ubuntu-18.04] + os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04] steps: - name: Checkout @@ -49,7 +49,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-16.04, ubuntu-18.04] + os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04] steps: - name: Checkout From d2de45568396ced0d48ef3aba995895213522648 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 4 Aug 2020 18:30:48 +0200 Subject: [PATCH 14/23] CI: use matrix.os instead of runner.os --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 53e558a9..c5c7fe7b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: with: path: toolchain.tar.gz # gcc/binutils/etc versions are in build_toolchain.sh, so that'll be part of our cache key - key: ${{ runner.os }}-${{ hashFiles('ndless-sdk/toolchain/build_toolchain.sh') }} + key: ${{ matrix.os }}-${{ hashFiles('ndless-sdk/toolchain/build_toolchain.sh') }} - name: Install dependencies if: steps.toolchain-cache.outputs.cache-hit != 'true' run: sudo apt install -y libmpfr-dev libmpc-dev @@ -41,7 +41,7 @@ jobs: - name: Upload built toolchain uses: actions/upload-artifact@v2 with: - name: toolchain-${{ runner.os }} + name: toolchain-${{ matrix.os }} path: toolchain.tar.gz build-sdk: needs: build-toolchain @@ -61,7 +61,7 @@ jobs: - name: Download built toolchain uses: actions/download-artifact@v2 with: - name: toolchain-${{ runner.os }} + name: toolchain-${{ matrix.os }} - name: Extract toolchain run: tar -xvzf toolchain.tar.gz ndless-sdk/toolchain/install - name: Set up PATH From 96d7dde5ab680e97df0faf193a6ec327c3826b69 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Wed, 5 Aug 2020 14:19:04 +0200 Subject: [PATCH 15/23] Update .github/workflows/main.yml use -j4 for make Co-authored-by: Fabian Vogt --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c5c7fe7b..d8f21fcf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,4 +71,4 @@ jobs: - name: Install dependencies run: sudo apt install -y libboost-program-options-dev libmpfr-dev libmpc-dev - name: Build - run: make + run: make -j4 From 0658eff445bcd0a215c198b9960bdbe5aad3b189 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Wed, 5 Aug 2020 14:49:36 +0200 Subject: [PATCH 16/23] CI: merge jobs into one --- .github/workflows/main.yml | 39 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d8f21fcf..35f002e8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ on: branches: [ master ] jobs: - build-toolchain: + build: runs-on: ${{ matrix.os }} strategy: matrix: @@ -18,19 +18,25 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - # we don't need submodules for building the toolchain + # we don't need submodules for building the toolchain, but we do for everything else + with: + submodules: 'recursive' + fetch-depth: 0 # submodule checkout does not work with depth=1 (the default) - # toolchain takes ~40min to build, so we want to avoid that whenever possible! + # build the toolchain first + # it takes ~40min to build, so we want to avoid that whenever possible! - uses: actions/cache@v2 id: toolchain-cache with: - path: toolchain.tar.gz + path: | + toolchain.tar.gz + ndless-sdk/toolchain/install # gcc/binutils/etc versions are in build_toolchain.sh, so that'll be part of our cache key key: ${{ matrix.os }}-${{ hashFiles('ndless-sdk/toolchain/build_toolchain.sh') }} - name: Install dependencies if: steps.toolchain-cache.outputs.cache-hit != 'true' run: sudo apt install -y libmpfr-dev libmpc-dev - - name: Build + - name: Build toolchain if: steps.toolchain-cache.outputs.cache-hit != 'true' working-directory: ndless-sdk/toolchain run: ./build_toolchain.sh @@ -43,32 +49,13 @@ jobs: with: name: toolchain-${{ matrix.os }} path: toolchain.tar.gz - build-sdk: - needs: build-toolchain - - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04] - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: 'recursive' - fetch-depth: 0 # submodule checkout does not work with depth=1 (the default) - - name: Download built toolchain - uses: actions/download-artifact@v2 - with: - name: toolchain-${{ matrix.os }} - - name: Extract toolchain - run: tar -xvzf toolchain.tar.gz ndless-sdk/toolchain/install + # actual build starts here - name: Set up PATH run: | echo "::add-path::$GITHUB_WORKSPACE/ndless-sdk/toolchain/install/bin" echo "::add-path::$GITHUB_WORKSPACE/ndless-sdk/bin" - name: Install dependencies - run: sudo apt install -y libboost-program-options-dev libmpfr-dev libmpc-dev + run: sudo apt install -y libboost-program-options-dev - name: Build run: make -j4 From a17785ea343db3a520da52015ad8a3dbb3d0b88f Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Wed, 5 Aug 2020 14:56:36 +0200 Subject: [PATCH 17/23] CI: always install toolchain dependencies --- .github/workflows/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 35f002e8..ea88affb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,6 +23,10 @@ jobs: submodules: 'recursive' fetch-depth: 0 # submodule checkout does not work with depth=1 (the default) + # needed both at compile- and runtime for the toolchain + - name: Install dependencies + run: sudo apt install -y libgmp-dev libmpfr-dev libmpc-dev + # build the toolchain first # it takes ~40min to build, so we want to avoid that whenever possible! - uses: actions/cache@v2 @@ -33,9 +37,6 @@ jobs: ndless-sdk/toolchain/install # gcc/binutils/etc versions are in build_toolchain.sh, so that'll be part of our cache key key: ${{ matrix.os }}-${{ hashFiles('ndless-sdk/toolchain/build_toolchain.sh') }} - - name: Install dependencies - if: steps.toolchain-cache.outputs.cache-hit != 'true' - run: sudo apt install -y libmpfr-dev libmpc-dev - name: Build toolchain if: steps.toolchain-cache.outputs.cache-hit != 'true' working-directory: ndless-sdk/toolchain From a14e1c5e2d2d531ce6a69b9f36cf15a930193d68 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Wed, 5 Aug 2020 15:03:51 +0200 Subject: [PATCH 18/23] CI: clarify a step --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ea88affb..dc8b509b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: fetch-depth: 0 # submodule checkout does not work with depth=1 (the default) # needed both at compile- and runtime for the toolchain - - name: Install dependencies + - name: Install toolchain dependencies run: sudo apt install -y libgmp-dev libmpfr-dev libmpc-dev # build the toolchain first From c5b01fdd9e0fa80065c0827af44847c2923e927b Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Thu, 6 Aug 2020 00:49:15 +0200 Subject: [PATCH 19/23] CI: remove ubuntu-16.04 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dc8b509b..f0ca9826 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04] + os: [ubuntu-18.04, ubuntu-20.04] steps: - name: Checkout From a12225c8eedae83800d668d14af4a05c237cfd2f Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Thu, 6 Aug 2020 00:50:10 +0200 Subject: [PATCH 20/23] CI: simplify artifact upload --- .github/workflows/main.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f0ca9826..5a8901b3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,6 @@ jobs: id: toolchain-cache with: path: | - toolchain.tar.gz ndless-sdk/toolchain/install # gcc/binutils/etc versions are in build_toolchain.sh, so that'll be part of our cache key key: ${{ matrix.os }}-${{ hashFiles('ndless-sdk/toolchain/build_toolchain.sh') }} @@ -41,15 +40,12 @@ jobs: if: steps.toolchain-cache.outputs.cache-hit != 'true' working-directory: ndless-sdk/toolchain run: ./build_toolchain.sh - - name: Package toolchain - if: steps.toolchain-cache.outputs.cache-hit != 'true' - run: tar -cvzf toolchain.tar.gz ndless-sdk/toolchain/install - name: Upload built toolchain uses: actions/upload-artifact@v2 with: name: toolchain-${{ matrix.os }} - path: toolchain.tar.gz + path: ndless-sdk/toolchain/install # actual build starts here - name: Set up PATH From 50b761a91e8770e137b4a7c3f2fe441b6a29a6dc Mon Sep 17 00:00:00 2001 From: fridtjof <2780577+fridtjof@users.noreply.github.com> Date: Mon, 10 Aug 2020 02:08:22 +0200 Subject: [PATCH 21/23] Revert "CI: simplify artifact upload" This reverts commit 8c0111370ac399fac84cbb889d57249ce9cb1471. --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5a8901b3..f0ca9826 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,6 +33,7 @@ jobs: id: toolchain-cache with: path: | + toolchain.tar.gz ndless-sdk/toolchain/install # gcc/binutils/etc versions are in build_toolchain.sh, so that'll be part of our cache key key: ${{ matrix.os }}-${{ hashFiles('ndless-sdk/toolchain/build_toolchain.sh') }} @@ -40,12 +41,15 @@ jobs: if: steps.toolchain-cache.outputs.cache-hit != 'true' working-directory: ndless-sdk/toolchain run: ./build_toolchain.sh + - name: Package toolchain + if: steps.toolchain-cache.outputs.cache-hit != 'true' + run: tar -cvzf toolchain.tar.gz ndless-sdk/toolchain/install - name: Upload built toolchain uses: actions/upload-artifact@v2 with: name: toolchain-${{ matrix.os }} - path: ndless-sdk/toolchain/install + path: toolchain.tar.gz # actual build starts here - name: Set up PATH From ececbcb974ec245442289cb64e7e8bcdbcc8da94 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 6 Oct 2020 01:17:40 +0200 Subject: [PATCH 22/23] ci: remove artifact uploads --- .github/workflows/main.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f0ca9826..0dab132e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,24 +32,13 @@ jobs: - uses: actions/cache@v2 id: toolchain-cache with: - path: | - toolchain.tar.gz - ndless-sdk/toolchain/install + path: ndless-sdk/toolchain/install # gcc/binutils/etc versions are in build_toolchain.sh, so that'll be part of our cache key key: ${{ matrix.os }}-${{ hashFiles('ndless-sdk/toolchain/build_toolchain.sh') }} - name: Build toolchain if: steps.toolchain-cache.outputs.cache-hit != 'true' working-directory: ndless-sdk/toolchain run: ./build_toolchain.sh - - name: Package toolchain - if: steps.toolchain-cache.outputs.cache-hit != 'true' - run: tar -cvzf toolchain.tar.gz ndless-sdk/toolchain/install - - - name: Upload built toolchain - uses: actions/upload-artifact@v2 - with: - name: toolchain-${{ matrix.os }} - path: toolchain.tar.gz # actual build starts here - name: Set up PATH From 9e1a5d049380cc41d6d6ffa4565d668651866e61 Mon Sep 17 00:00:00 2001 From: Fridtjof Mund <2780577+fridtjof@users.noreply.github.com> Date: Tue, 6 Oct 2020 02:12:28 +0200 Subject: [PATCH 23/23] CI: update PATH setup to use environment files see https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ --- .github/workflows/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0dab132e..d1e94c6f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,7 @@ jobs: - name: Install toolchain dependencies run: sudo apt install -y libgmp-dev libmpfr-dev libmpc-dev + # ndless-sdk # build the toolchain first # it takes ~40min to build, so we want to avoid that whenever possible! - uses: actions/cache@v2 @@ -40,11 +41,11 @@ jobs: working-directory: ndless-sdk/toolchain run: ./build_toolchain.sh - # actual build starts here + # ndless - name: Set up PATH run: | - echo "::add-path::$GITHUB_WORKSPACE/ndless-sdk/toolchain/install/bin" - echo "::add-path::$GITHUB_WORKSPACE/ndless-sdk/bin" + echo "$GITHUB_WORKSPACE/ndless-sdk/toolchain/install/bin" >> $GITHUB_PATH + echo "$GITHUB_WORKSPACE/ndless-sdk/bin" >> $GITHUB_PATH - name: Install dependencies run: sudo apt install -y libboost-program-options-dev - name: Build