From faf40f5f08e39b302469bfce4a9207d7acd23fe0 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sat, 3 Apr 2021 19:34:24 -1000 Subject: [PATCH 01/36] WIP Mac building --- .circleci/config.yml | 144 +++++++++++++++++++++++++++++-------------- 1 file changed, 98 insertions(+), 46 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3f18bc7..2220ba6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,8 +2,8 @@ defaults: &defaults working_directory: /home/nerves/build environment: ENV: CI - docker: - - image: nervesproject/toolchains + # This will likely have to change since it means we're using a docker container instead of running on macOS + # https://circleci.com/docs/2.0/executor-types/ install_hex_rebar: &install_hex_rebar run: @@ -33,6 +33,7 @@ build: &build source $BASH_ENV - run: name: Fetch Dependencies + # This downloads the raspberrypi tools (which is where raspbian comes from) command: git clone git://github.com/raspberrypi/tools.git - run: name: Fetch Deps @@ -82,6 +83,13 @@ test: &test name: Compile command: /root/toolchain/bin/*-g++ main.cpp +#------------------------------- +# Re-usable YAML anchors (to be merged with `<<`) +#------------------------------- +docker_default: &docker_default + docker: + - image: nervesproject/toolchains + build_workflow: &build_workflow context: org-global filters: @@ -107,9 +115,12 @@ canadian_rpi: &canadian_rpi HOST_ARCH: arm BUILD_OS: rpi -linux: &linux +linux_env: &linux_env BUILD_OS: linux +macos: &macos + BUILD_OS: macos + version: 2.0 jobs: @@ -121,14 +132,14 @@ jobs: # build # linux build_linux_nerves_toolchain_aarch64_nerves_linux_gnu: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *build # rpi build_rpi_nerves_toolchain_aarch64_nerves_linux_gnu: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu <<: *canadian_rpi @@ -141,33 +152,33 @@ jobs: # build # linux build_linux_nerves_toolchain_armv7_nerves_linux_gnueabihf: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_armv7_nerves_linux_gnueabihf - <<: *linux + <<: *linux_env <<: *build # rpi build_rpi_nerves_toolchain_armv7_nerves_linux_gnueabihf: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_armv7_nerves_linux_gnueabihf <<: *canadian_rpi <<: *build #------------------------------- - # armv5_nerves_linux_musleabi + # armv5_nerves_linux_musleabi 1 (jobs) (build) #------------------------------- # build # linux build_linux_nerves_toolchain_armv5_nerves_linux_musleabi: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_armv5_nerves_linux_musleabi - <<: *linux + <<: *linux_env <<: *build # rpi build_rpi_nerves_toolchain_armv5_nerves_linux_musleabi: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_armv5_nerves_linux_musleabi <<: *canadian_rpi @@ -179,15 +190,15 @@ jobs: # build # linux build_linux_nerves_toolchain_armv6_nerves_linux_gnueabihf: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_armv6_nerves_linux_gnueabihf - <<: *linux + <<: *linux_env <<: *build # rpi build_rpi_nerves_toolchain_armv6_nerves_linux_gnueabihf: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_armv6_nerves_linux_gnueabihf <<: *canadian_rpi @@ -199,14 +210,14 @@ jobs: # build # linux build_linux_nerves_toolchain_i586_nerves_linux_gnu: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_i586_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *build # rpi build_rpi_nerves_toolchain_i586_nerves_linux_gnu: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_i586_nerves_linux_gnu <<: *canadian_rpi @@ -218,14 +229,14 @@ jobs: # build # linux build_linux_nerves_toolchain_mipsel_nerves_linux_musl: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_mipsel_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *build # rpi build_rpi_nerves_toolchain_mipsel_nerves_linux_musl: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_mipsel_nerves_linux_musl <<: *canadian_rpi @@ -237,14 +248,14 @@ jobs: # build # linux build_linux_nerves_toolchain_x86_64_nerves_linux_gnu: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *build # rpi build_rpi_nerves_toolchain_x86_64_nerves_linux_gnu: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_gnu <<: *canadian_rpi @@ -256,14 +267,14 @@ jobs: # build # linux build_linux_nerves_toolchain_x86_64_nerves_linux_musl: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *build # rpi build_rpi_nerves_toolchain_x86_64_nerves_linux_musl: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_musl <<: *canadian_rpi @@ -282,7 +293,7 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test @@ -297,11 +308,11 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_armv7_nerves_linux_gnueabihf - <<: *linux + <<: *linux_env <<: *test #------------------------------- - # armv5_nerves_linux_musleabi + # armv5_nerves_linux_musleabi 2 (test) #------------------------------- # test # linux @@ -311,7 +322,7 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_armv5_nerves_linux_musleabi - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -325,7 +336,7 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_armv6_nerves_linux_gnueabihf - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -339,7 +350,7 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_i586_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -353,7 +364,7 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_mipsel_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -367,7 +378,7 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -381,7 +392,7 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -397,7 +408,7 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test @@ -412,11 +423,11 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_armv7_nerves_linux_gnueabihf - <<: *linux + <<: *linux_env <<: *test #------------------------------- - # armv5_nerves_linux_musleabi + # armv5_nerves_linux_musleabi (3) #------------------------------- # test # linux @@ -426,7 +437,7 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_armv5_nerves_linux_musleabi - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -440,7 +451,7 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_armv6_nerves_linux_gnueabihf - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -454,7 +465,7 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_i586_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -468,7 +479,7 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_mipsel_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -482,7 +493,7 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -496,16 +507,18 @@ jobs: - image: nervesproject/toolchain-test-ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *test deploy: + # Hmmmmmmm, do I need to replace this whole section? <<: *defaults steps: - checkout - run: name: Create Artifacts Dir command: mkdir -p /home/nerves/deploy/artifacts + # These steps seem a bit odd. Could they be paramaterized? - run: name: nerves_toolchain_aarch64_nerves_linux_gnu command: echo "nerves_toolchain_aarch64_nerves_linux_gnu" > .toolchain @@ -613,6 +626,7 @@ jobs: - run: name: Copy Artifacts command: cp /home/nerves/deploy/toolchain/*.tar.xz /home/nerves/deploy/artifacts + # Will need to run these steps on macos as well - run: name: Install dependencies command: | @@ -793,33 +807,71 @@ workflows: requires: - build_linux_nerves_toolchain_x86_64_nerves_linux_musl + #------------------------------- + # macOS Stuff + #------------------------------- + # https://circleci.com/docs/2.0/testing-macos/ + # https://circleci.com/docs/2.0/hello-world-macos/ + # Example mac application: https://github.com/CircleCI-Public/circleci-demo-macos + # Using homebrew on CircleCI: https://circleci.com/docs/2.0/testing-ios/#using-homebrew + # Maybe disable homebrew auto-update https://circleci.com/docs/2.0/testing-ios/#optimizing-homebrew + # Will probably require a macOS orb: https://circleci.com/developer/orbs/orb/circleci/macos + # + # From Frank + # brew update + # brew install gawk binutils xz wget automake gnu-tar help2man bash make ncurses + # brew install libtool autoconf gnu-sed mpfr gmp gcc bison lzip python3 grep coreutils + # mix archive.install hex nerves_bootstrap + # git clone https://github.com/nerves-project/toolchains.git + # cd toolchains + # ./build_release.sh + # + # copy *.tar.xz to GitHub releases + #------------------------------- # Deploy Toolchains #------------------------------- - deploy: <<: *deploy_workflow requires: + # aarch64 linux gnu - test_linux_trusty_aarch64_nerves_linux_gnu - test_linux_xenial_aarch64_nerves_linux_gnu - build_rpi_nerves_toolchain_aarch64_nerves_linux_gnu + + # armv7 linux gnueabihf - test_linux_trusty_armv7_nerves_linux_gnueabihf - test_linux_xenial_armv7_nerves_linux_gnueabihf - build_rpi_nerves_toolchain_armv7_nerves_linux_gnueabihf + + # armv5 linux musleabi - test_linux_trusty_armv5_nerves_linux_musleabi - test_linux_xenial_armv5_nerves_linux_musleabi - build_rpi_nerves_toolchain_armv5_nerves_linux_musleabi + + # armv6 linux gnueabi - test_linux_trusty_armv6_nerves_linux_gnueabi - test_linux_xenial_armv6_nerves_linux_gnueabi - build_rpi_nerves_toolchain_armv6_nerves_linux_gnueabihf + + # i586 linux gnu - test_linux_trusty_i586_nerves_linux_gnu - test_linux_xenial_i586_nerves_linux_gnu - build_rpi_nerves_toolchain_i586_nerves_linux_gnu + + # mipsel linux musl - test_linux_trusty_mipsel_nerves_linux_musl - test_linux_xenial_mipsel_nerves_linux_musl - build_rpi_nerves_toolchain_mipsel_nerves_linux_musl + + # x86_64 linux gnu - test_linux_trusty_x86_64_nerves_linux_gnu - test_linux_xenial_x86_64_nerves_linux_gnu - build_rpi_nerves_toolchain_x86_64_nerves_linux_gnu + + # x86_64 linux musl - test_linux_trusty_x86_64_nerves_linux_musl - test_linux_xenial_x86_64_nerves_linux_musl - build_rpi_nerves_toolchain_x86_64_nerves_linux_musl + + # macOS From 1b389764cb05ee2c67659a6fa09b85c56620a25c Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Tue, 6 Apr 2021 20:23:32 -1000 Subject: [PATCH 02/36] Updated config.yml --- .circleci/config.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2220ba6..1953d95 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,15 @@ +version: 2.1 + defaults: &defaults working_directory: /home/nerves/build environment: ENV: CI + docker: + - image: nervesproject/toolchains + +orbs: + my-macos: circleci/macos@1.1.0 + #mac-permissions: circleci/macos # This will likely have to change since it means we're using a docker container instead of running on macOS # https://circleci.com/docs/2.0/executor-types/ @@ -121,8 +129,6 @@ linux_env: &linux_env macos: &macos BUILD_OS: macos -version: 2.0 - jobs: #------------------------------- # Build @@ -510,6 +516,19 @@ jobs: <<: *linux_env <<: *test + build_macos_toolchain: + working_directory: /root + macos: + xcode: 11.7.0 + steps: + - checkout + - run: + name: Install cowsay + command: brew install cowsay + - run: + name: cowsay hi + command: cowsay Hi! + deploy: # Hmmmmmmm, do I need to replace this whole section? <<: *defaults @@ -827,6 +846,9 @@ workflows: # ./build_release.sh # # copy *.tar.xz to GitHub releases + - build_macos_toolchain: + # TODO: Is test_workflow correct? + <<: *test_workflow #------------------------------- # Deploy Toolchains @@ -875,3 +897,4 @@ workflows: - build_rpi_nerves_toolchain_x86_64_nerves_linux_musl # macOS + - build_macos_toolchain From 33f0c264a75a246cd477ab7b3134ead3a1ce58b2 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Tue, 6 Apr 2021 20:26:08 -1000 Subject: [PATCH 03/36] Updated config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1953d95..937342e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -517,7 +517,7 @@ jobs: <<: *test build_macos_toolchain: - working_directory: /root + working_directory: /home/nerves/build macos: xcode: 11.7.0 steps: From f0d5b8af596e070a766ccbdf6c901cd45fe7aa10 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Tue, 6 Apr 2021 20:28:25 -1000 Subject: [PATCH 04/36] Updated config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 937342e..628dec0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -517,7 +517,7 @@ jobs: <<: *test build_macos_toolchain: - working_directory: /home/nerves/build + #working_directory: /home/nerves/build macos: xcode: 11.7.0 steps: From b62bb72ff3867085f15b180738c0f3de75f3bbf2 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Tue, 6 Apr 2021 20:32:32 -1000 Subject: [PATCH 05/36] Updated config.yml --- .circleci/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 628dec0..398ba63 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -518,6 +518,8 @@ jobs: build_macos_toolchain: #working_directory: /home/nerves/build + environment: + HOMEBREW_NO_AUTO_UPDATE: 1 macos: xcode: 11.7.0 steps: @@ -528,6 +530,12 @@ jobs: - run: name: cowsay hi command: cowsay Hi! + - run: + name: brew deps + command: brew install gawk binutils xz wget automake gnu-tar help2man bash make ncurses libtool autoconf gnu-sed mpfr gmp gcc bison lzip python3 grep coreutils + - run: + name: install hex and nerves_bootstrap + command: mix archive.install hex nerves_bootstrap deploy: # Hmmmmmmm, do I need to replace this whole section? From db0b19c9af68b226a317a1cd684589c1303c6bb1 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Tue, 6 Apr 2021 20:39:20 -1000 Subject: [PATCH 06/36] Updated config.yml --- .circleci/config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 398ba63..1e54b77 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ defaults: &defaults environment: ENV: CI docker: - - image: nervesproject/toolchains + - image: nervesproject/toolchains-nonexistant orbs: my-macos: circleci/macos@1.1.0 @@ -532,7 +532,9 @@ jobs: command: cowsay Hi! - run: name: brew deps - command: brew install gawk binutils xz wget automake gnu-tar help2man bash make ncurses libtool autoconf gnu-sed mpfr gmp gcc bison lzip python3 grep coreutils + command: brew install gawk binutils xz wget automake gnu-tar help2man bash make ncurses libtool autoconf gnu-sed mpfr gmp gcc bison lzip python3 grep coreutils elixir erlang + - <<: *install_hex_rebar + - <<: *install_nerves_bootstrap - run: name: install hex and nerves_bootstrap command: mix archive.install hex nerves_bootstrap From 2de98698d9bc336191404bee14072a2a8c3aabb3 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Tue, 6 Apr 2021 20:44:49 -1000 Subject: [PATCH 07/36] Updated config.yml --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1e54b77..cd9da50 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -536,8 +536,9 @@ jobs: - <<: *install_hex_rebar - <<: *install_nerves_bootstrap - run: - name: install hex and nerves_bootstrap - command: mix archive.install hex nerves_bootstrap + name: Build release + command: ./build_release.sh + deploy: # Hmmmmmmm, do I need to replace this whole section? From 99f1527997ecca799b042e22c82cce1014441969 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Tue, 6 Apr 2021 21:22:39 -1000 Subject: [PATCH 08/36] Try building a specific toolchain --- .circleci/config.yml | 46 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cd9da50..51a8de6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -123,12 +123,21 @@ canadian_rpi: &canadian_rpi HOST_ARCH: arm BUILD_OS: rpi +canadian_rpi_mac: &canadian_rpi_mac + HOST_OS: mac + HOST_ARCH: arm + BUILD_OS: rpi + +mac_xcode: &mac_xcode + xcode: 11.7.0 + +mac_env: &mac_env + BUILD_OS: mac + HOMEBREW_NO_AUTO_UPDATE: 1 + linux_env: &linux_env BUILD_OS: linux -macos: &macos - BUILD_OS: macos - jobs: #------------------------------- # Build @@ -151,6 +160,13 @@ jobs: <<: *canadian_rpi <<: *build + build_mac_nerves_toolchain_aarch64_nerves_mac_gnu: + <<: *defaults + environment: + TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu-darwin_arm + <<: *mac_env + <<: *canadian_rpi_mac + <<: *build #------------------------------- # armv7_nerves_linux_gnueabihf @@ -286,6 +302,21 @@ jobs: <<: *canadian_rpi <<: *build + + test_mac_trusty_aarch64_nerves_linux_gnu-darwin_x86_64: + working_directory: /root + docker: + - image: nervesproject/toolchain-test-ubuntu:trusty + environment: + # TODO: Should this be mac_gnu? + # nerves_toolchain_armv7_nerves_linux_gnueabihf-darwin_x86_64-1.4.2 + # nerves_toolchain_aarch64_nerves_linux_gnu + TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu-darwin_arm + # TODO: add this as well + # nerves_toolchain_aarch64_nerves_linux_gnu-darwin_x86_64 + <<: *mac_env + <<: *test + #------------------------------- # Test Trusty #------------------------------- @@ -519,9 +550,8 @@ jobs: build_macos_toolchain: #working_directory: /home/nerves/build environment: - HOMEBREW_NO_AUTO_UPDATE: 1 - macos: - xcode: 11.7.0 + <<: *mac_env + <<: *mac_xcode steps: - checkout - run: @@ -908,4 +938,6 @@ workflows: - build_rpi_nerves_toolchain_x86_64_nerves_linux_musl # macOS - - build_macos_toolchain + #- build_macos_toolchain + - test_mac_trusty_aarch64_nerves_linux_gnu-darwin_x86_64 + - build_mac_nerves_toolchain_aarch64_nerves_mac_gnu From 1541ff8425689b2c00b9f3ce63c28fcaa2791958 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Tue, 6 Apr 2021 21:31:54 -1000 Subject: [PATCH 09/36] Updated config.yml --- .circleci/config.yml | 50 +++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 51a8de6..b98ce9b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -547,27 +547,27 @@ jobs: <<: *linux_env <<: *test - build_macos_toolchain: - #working_directory: /home/nerves/build - environment: - <<: *mac_env - <<: *mac_xcode - steps: - - checkout - - run: - name: Install cowsay - command: brew install cowsay - - run: - name: cowsay hi - command: cowsay Hi! - - run: - name: brew deps - command: brew install gawk binutils xz wget automake gnu-tar help2man bash make ncurses libtool autoconf gnu-sed mpfr gmp gcc bison lzip python3 grep coreutils elixir erlang - - <<: *install_hex_rebar - - <<: *install_nerves_bootstrap - - run: - name: Build release - command: ./build_release.sh + # build_macos_toolchain: + # #working_directory: /home/nerves/build + # environment: + # <<: *mac_env + # <<: *mac_xcode + # steps: + # - checkout + # - run: + # name: Install cowsay + # command: brew install cowsay + # - run: + # name: cowsay hi + # command: cowsay Hi! + # - run: + # name: brew deps + # command: brew install gawk binutils xz wget automake gnu-tar help2man bash make ncurses libtool autoconf gnu-sed mpfr gmp gcc bison lzip python3 grep coreutils elixir erlang + # - <<: *install_hex_rebar + # - <<: *install_nerves_bootstrap + # - run: + # name: Build release + # command: ./build_release.sh deploy: @@ -706,6 +706,9 @@ workflows: #------------------------------- # Build Toolchains #------------------------------- + - build_mac_nerves_toolchain_aarch64_nerves_mac_gnu: + <<: *build_workflow + # aarch64_nerves_linux_gnu #------------------------------- - build_linux_nerves_toolchain_aarch64_nerves_linux_gnu: @@ -887,9 +890,12 @@ workflows: # ./build_release.sh # # copy *.tar.xz to GitHub releases - - build_macos_toolchain: + - test_mac_trusty_aarch64_nerves_linux_gnu-darwin_x86_64: # TODO: Is test_workflow correct? <<: *test_workflow + requires: + - build_mac_nerves_toolchain_aarch64_nerves_mac_gnu + #------------------------------- # Deploy Toolchains From a65590b7247b94bba97cc9864ba10356b2a717fa Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Tue, 6 Apr 2021 21:45:56 -1000 Subject: [PATCH 10/36] use build_mac section --- .circleci/config.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b98ce9b..a105b33 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -73,6 +73,24 @@ build: &build paths: - /home/nerves/deploy/toolchain +build_mac: &build_mac + steps: + - checkout + - run: + name: Install cowsay + command: brew install cowsay + - run: + name: cowsay hi + command: cowsay Hi! + - run: + name: brew deps + command: brew install gawk binutils xz wget automake gnu-tar help2man bash make ncurses libtool autoconf gnu-sed mpfr gmp gcc bison lzip python3 grep coreutils elixir erlang + - <<: *install_hex_rebar + - <<: *install_nerves_bootstrap + - run: + name: Build release + command: ./build_release.sh + test: &test steps: - run: @@ -166,7 +184,8 @@ jobs: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu-darwin_arm <<: *mac_env <<: *canadian_rpi_mac - <<: *build + <<: *mac_xcode + <<: *build_mac #------------------------------- # armv7_nerves_linux_gnueabihf From 67d3d660159544846e4036de633dc73895579667 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Tue, 6 Apr 2021 21:48:51 -1000 Subject: [PATCH 11/36] Updated config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a105b33..648e0eb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -74,6 +74,7 @@ build: &build - /home/nerves/deploy/toolchain build_mac: &build_mac + #xcode: 11.7.0 steps: - checkout - run: @@ -184,7 +185,6 @@ jobs: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu-darwin_arm <<: *mac_env <<: *canadian_rpi_mac - <<: *mac_xcode <<: *build_mac #------------------------------- From e781b0201fb7f7a7901b987c40bbbf6fc8874772 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Tue, 6 Apr 2021 21:54:29 -1000 Subject: [PATCH 12/36] Updated config.yml --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 648e0eb..027a2c1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -180,9 +180,13 @@ jobs: <<: *build build_mac_nerves_toolchain_aarch64_nerves_mac_gnu: - <<: *defaults + macos: + <<: *mac_xcode + # TODO: these should be in mac_defaults + working_directory: /home/nerves/build environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu-darwin_arm + ENV: CI <<: *mac_env <<: *canadian_rpi_mac <<: *build_mac From fc31ea00b5ab33861077924af09c59fa1389104c Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Tue, 6 Apr 2021 21:55:50 -1000 Subject: [PATCH 13/36] Updated config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 027a2c1..540ae67 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -183,7 +183,7 @@ jobs: macos: <<: *mac_xcode # TODO: these should be in mac_defaults - working_directory: /home/nerves/build + #working_directory: /home/nerves/build environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu-darwin_arm ENV: CI From 9dbfae8b53865b53e53bd0ccf7425447093a8c1e Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Wed, 7 Apr 2021 19:45:23 -1000 Subject: [PATCH 14/36] Update .circleci/config.yml Co-authored-by: Frank Hunleth --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 540ae67..aa2e3cc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -151,7 +151,7 @@ mac_xcode: &mac_xcode xcode: 11.7.0 mac_env: &mac_env - BUILD_OS: mac + BUILD_OS: Darwin HOMEBREW_NO_AUTO_UPDATE: 1 linux_env: &linux_env From d331ee7e9fd18414a5217ce2ed54a36fe49ae7dc Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Wed, 7 Apr 2021 20:01:06 -1000 Subject: [PATCH 15/36] Use BUILD_OS: Darwin --- .circleci/config.yml | 8 ++------ nerves_toolchain_ctng/build.sh | 4 ++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index aa2e3cc..0945f2f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -142,11 +142,6 @@ canadian_rpi: &canadian_rpi HOST_ARCH: arm BUILD_OS: rpi -canadian_rpi_mac: &canadian_rpi_mac - HOST_OS: mac - HOST_ARCH: arm - BUILD_OS: rpi - mac_xcode: &mac_xcode xcode: 11.7.0 @@ -185,10 +180,10 @@ jobs: # TODO: these should be in mac_defaults #working_directory: /home/nerves/build environment: + # Don't need darwin_arm TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu-darwin_arm ENV: CI <<: *mac_env - <<: *canadian_rpi_mac <<: *build_mac #------------------------------- @@ -969,4 +964,5 @@ workflows: # macOS #- build_macos_toolchain - test_mac_trusty_aarch64_nerves_linux_gnu-darwin_x86_64 + # aarch64 is incorrect! - build_mac_nerves_toolchain_aarch64_nerves_mac_gnu diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index 85b8d7c..71919de 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -45,6 +45,10 @@ if [[ -z $HOST_OS ]]; then HOST_OS=$BUILD_OS fi +echo "Using HOST_ARCH: $HOST_ARCH" +echo "Using HOST_OS: $HOST_OS" +echo "Using BUILD_OS: $BUILD_OS" + if [[ ! -e $BASE_CONFIG ]]; then echo "Can't find $BASE_CONFIG. Check that it exists." echo From 6a197800f8c1a0fab55c8e2aeae970b37eebb799 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Wed, 7 Apr 2021 20:30:26 -1000 Subject: [PATCH 16/36] use nerves branch --- nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs b/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs index ce981b8..afe2d1a 100644 --- a/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs +++ b/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs @@ -47,7 +47,8 @@ defmodule NervesToolchainArmV7NervesLinuxGnueabihf.MixProject do defp deps do [ - {:nerves, "~> 1.0", runtime: false}, + #{:nerves, "~> 1.0", runtime: false}, + {:nerves, github: "axelson/nerves", runtime: false, branch: "debug"}, {:nerves_toolchain_ctng, "~> 1.8.1", runtime: false} ] end From b30c4f14168ab5dc581d21f5dff1646927f89578 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Wed, 7 Apr 2021 20:32:31 -1000 Subject: [PATCH 17/36] add override --- nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs | 2 +- nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs b/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs index afe2d1a..c79321c 100644 --- a/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs +++ b/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs @@ -48,7 +48,7 @@ defmodule NervesToolchainArmV7NervesLinuxGnueabihf.MixProject do defp deps do [ #{:nerves, "~> 1.0", runtime: false}, - {:nerves, github: "axelson/nerves", runtime: false, branch: "debug"}, + {:nerves, github: "axelson/nerves", runtime: false, branch: "debug", override: true}, {:nerves_toolchain_ctng, "~> 1.8.1", runtime: false} ] end diff --git a/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock b/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock index fc33e35..e3d40a7 100644 --- a/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock +++ b/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock @@ -1,5 +1,5 @@ %{ "elixir_make": {:hex, :elixir_make, "0.6.2", "7dffacd77dec4c37b39af867cedaabb0b59f6a871f89722c25b28fcd4bd70530", [:mix], [], "hexpm", "03e49eadda22526a7e5279d53321d1cced6552f344ba4e03e619063de75348d9"}, - "nerves": {:hex, :nerves, "1.7.4", "6dc9c9c79baf9af540e34638e2fd964700f68f8dcece7cad26048c3a89ef6788", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "ac99ab1aa27ace81fd6d49e311697e8027b5c34b00728523e0721a8e2f4414eb"}, + "nerves": {:hex, :nerves, "1.7.5", "a70d3ecb64cbe92518b92dca9ef6c126b5be1a25f1601f3ecadb22b3ac8b7b3a", [], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "209ada12aace0e0d1c0cd19f0be71bb9f9fafe43d029b49152218bdc77a3628b"}, "nerves_toolchain_ctng": {:hex, :nerves_toolchain_ctng, "1.8.3", "b5f3c91f84deced0dadfcce1265660bc2aab9a7b042953146a8fb053201894b7", [:mix], [{:nerves, "~> 1.0", [hex: :nerves, repo: "hexpm", optional: false]}], "hexpm", "6c50fafed0f7b8681dfbb54ca17c6f7fadd939ef7893159c2e9d32c862fa0e1e"}, } From 02c9e1429d7db24e143b7a1f0b9042f2fa0abb34 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Wed, 7 Apr 2021 20:51:25 -1000 Subject: [PATCH 18/36] update nerves branch --- nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock b/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock index e3d40a7..cff2399 100644 --- a/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock +++ b/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock @@ -1,5 +1,5 @@ %{ "elixir_make": {:hex, :elixir_make, "0.6.2", "7dffacd77dec4c37b39af867cedaabb0b59f6a871f89722c25b28fcd4bd70530", [:mix], [], "hexpm", "03e49eadda22526a7e5279d53321d1cced6552f344ba4e03e619063de75348d9"}, - "nerves": {:hex, :nerves, "1.7.5", "a70d3ecb64cbe92518b92dca9ef6c126b5be1a25f1601f3ecadb22b3ac8b7b3a", [], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "209ada12aace0e0d1c0cd19f0be71bb9f9fafe43d029b49152218bdc77a3628b"}, + "nerves": {:git, "https://github.com/axelson/nerves.git", "f21c3155c0c3bc764b252d3248d272dc58e69d1a", [branch: "debug"]}, "nerves_toolchain_ctng": {:hex, :nerves_toolchain_ctng, "1.8.3", "b5f3c91f84deced0dadfcce1265660bc2aab9a7b042953146a8fb053201894b7", [:mix], [{:nerves, "~> 1.0", [hex: :nerves, repo: "hexpm", optional: false]}], "hexpm", "6c50fafed0f7b8681dfbb54ca17c6f7fadd939ef7893159c2e9d32c862fa0e1e"}, } From f0c1c9cb720894fad5c5ef9bfebbc74850876ee3 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Wed, 7 Apr 2021 21:09:29 -1000 Subject: [PATCH 19/36] debug --- nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock b/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock index cff2399..30ff488 100644 --- a/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock +++ b/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.lock @@ -1,5 +1,5 @@ %{ "elixir_make": {:hex, :elixir_make, "0.6.2", "7dffacd77dec4c37b39af867cedaabb0b59f6a871f89722c25b28fcd4bd70530", [:mix], [], "hexpm", "03e49eadda22526a7e5279d53321d1cced6552f344ba4e03e619063de75348d9"}, - "nerves": {:git, "https://github.com/axelson/nerves.git", "f21c3155c0c3bc764b252d3248d272dc58e69d1a", [branch: "debug"]}, + "nerves": {:git, "https://github.com/axelson/nerves.git", "bb94df35eec17c66cc06fe1f9b5bcf3045a08c9c", [branch: "debug"]}, "nerves_toolchain_ctng": {:hex, :nerves_toolchain_ctng, "1.8.3", "b5f3c91f84deced0dadfcce1265660bc2aab9a7b042953146a8fb053201894b7", [:mix], [{:nerves, "~> 1.0", [hex: :nerves, repo: "hexpm", optional: false]}], "hexpm", "6c50fafed0f7b8681dfbb54ca17c6f7fadd939ef7893159c2e9d32c862fa0e1e"}, } From f2b3c6dd26e88c63c69b5637c9c3ed8fc9151196 Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Thu, 8 Apr 2021 08:18:54 -0400 Subject: [PATCH 20/36] Bump versions to 1.4.3-dev --- nerves_toolchain_aarch64_nerves_linux_gnu/VERSION | 2 +- nerves_toolchain_armv5_nerves_linux_musleabi/VERSION | 2 +- nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION | 2 +- nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION | 2 +- nerves_toolchain_i586_nerves_linux_gnu/VERSION | 2 +- nerves_toolchain_mipsel_nerves_linux_musl/VERSION | 2 +- nerves_toolchain_x86_64_nerves_linux_gnu/VERSION | 2 +- nerves_toolchain_x86_64_nerves_linux_musl/VERSION | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nerves_toolchain_aarch64_nerves_linux_gnu/VERSION b/nerves_toolchain_aarch64_nerves_linux_gnu/VERSION index 9df886c..2f0ed73 100644 --- a/nerves_toolchain_aarch64_nerves_linux_gnu/VERSION +++ b/nerves_toolchain_aarch64_nerves_linux_gnu/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3-dev diff --git a/nerves_toolchain_armv5_nerves_linux_musleabi/VERSION b/nerves_toolchain_armv5_nerves_linux_musleabi/VERSION index 9df886c..2f0ed73 100644 --- a/nerves_toolchain_armv5_nerves_linux_musleabi/VERSION +++ b/nerves_toolchain_armv5_nerves_linux_musleabi/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3-dev diff --git a/nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION b/nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION index 9df886c..2f0ed73 100644 --- a/nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION +++ b/nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3-dev diff --git a/nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION b/nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION index 9df886c..2f0ed73 100644 --- a/nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION +++ b/nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3-dev diff --git a/nerves_toolchain_i586_nerves_linux_gnu/VERSION b/nerves_toolchain_i586_nerves_linux_gnu/VERSION index 9df886c..2f0ed73 100644 --- a/nerves_toolchain_i586_nerves_linux_gnu/VERSION +++ b/nerves_toolchain_i586_nerves_linux_gnu/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3-dev diff --git a/nerves_toolchain_mipsel_nerves_linux_musl/VERSION b/nerves_toolchain_mipsel_nerves_linux_musl/VERSION index 9df886c..2f0ed73 100644 --- a/nerves_toolchain_mipsel_nerves_linux_musl/VERSION +++ b/nerves_toolchain_mipsel_nerves_linux_musl/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3-dev diff --git a/nerves_toolchain_x86_64_nerves_linux_gnu/VERSION b/nerves_toolchain_x86_64_nerves_linux_gnu/VERSION index 9df886c..2f0ed73 100644 --- a/nerves_toolchain_x86_64_nerves_linux_gnu/VERSION +++ b/nerves_toolchain_x86_64_nerves_linux_gnu/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3-dev diff --git a/nerves_toolchain_x86_64_nerves_linux_musl/VERSION b/nerves_toolchain_x86_64_nerves_linux_musl/VERSION index 9df886c..2f0ed73 100644 --- a/nerves_toolchain_x86_64_nerves_linux_musl/VERSION +++ b/nerves_toolchain_x86_64_nerves_linux_musl/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3-dev From cb38d17e1d88ef0bae3338c6e3a6d49005a54b53 Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Thu, 8 Apr 2021 11:19:25 -0400 Subject: [PATCH 21/36] Work around case issues with BUILD_OS --- nerves_toolchain_ctng/build.sh | 9 ++++----- nerves_toolchain_ctng/scripts/archive.sh | 2 +- support/scripts/use-ctng-hex-dep.sh | 2 +- support/scripts/use-ctng-path-dep.sh | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index 71919de..47c0daf 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -25,18 +25,17 @@ ARTIFACT_NAME=$(basename "$WORK_DIR") READLINK=readlink BUILD_ARCH=$(uname -m) -BUILD_OS=$(uname -s) -if [[ $BUILD_OS = "CYGWIN_NT-6.1" ]]; then - # A simple Cygwin looks better. +BUILD_OS=$(uname -s | awk '{print tolower($0)}') +if [[ $BUILD_OS = "cygwin_nt-6.1" ]]; then + # A simple cygwin looks better. BUILD_OS="cygwin" -elif [[ $BUILD_OS = "Darwin" ]]; then +elif [[ $BUILD_OS = "darwin" ]]; then # Homebrew has a different prefix depending on x86_64 or aarch64 HOMEBREW_PREFIX="$(brew --prefix)" # Make sure that we use GNU readlink on OSX READLINK=greadlink fi -BUILD_OS=$(echo "$BUILD_OS" | awk '{print tolower($0)}') if [[ -z $HOST_ARCH ]]; then HOST_ARCH=$BUILD_ARCH diff --git a/nerves_toolchain_ctng/scripts/archive.sh b/nerves_toolchain_ctng/scripts/archive.sh index 60db3c9..0aee67e 100755 --- a/nerves_toolchain_ctng/scripts/archive.sh +++ b/nerves_toolchain_ctng/scripts/archive.sh @@ -14,7 +14,7 @@ GCC_INSTALL_DIR=$WORK_DIR/x-tools BUILD_OS=$(uname -s) -if [[ $BUILD_OS = "Darwin" ]]; then +if [[ $BUILD_OS = "Darwin" || $BUILD_OS = "darwin" ]]; then # Use GNU tar from Homebrew (brew install gnu-tar) TAR=gtar else diff --git a/support/scripts/use-ctng-hex-dep.sh b/support/scripts/use-ctng-hex-dep.sh index 59d575f..e88cc05 100755 --- a/support/scripts/use-ctng-hex-dep.sh +++ b/support/scripts/use-ctng-hex-dep.sh @@ -5,7 +5,7 @@ set -e . ./support/scripts/all-configs.sh BUILD_OS=$(uname -s) -if [[ $BUILD_OS = "Darwin" ]]; then +if [[ $BUILD_OS = "Darwin" || $BUILD_OS = "darwin" ]]; then SED=gsed else SED=sed diff --git a/support/scripts/use-ctng-path-dep.sh b/support/scripts/use-ctng-path-dep.sh index 789401d..a34c527 100755 --- a/support/scripts/use-ctng-path-dep.sh +++ b/support/scripts/use-ctng-path-dep.sh @@ -5,7 +5,7 @@ set -e . ./support/scripts/all-configs.sh BUILD_OS=$(uname -s) -if [[ $BUILD_OS = "Darwin" ]]; then +if [[ $BUILD_OS = "Darwin" || $BUILD_OS = "darwin" ]]; then SED=gsed else SED=sed From 802dcb38deba8a059e4c0a90e12d5f29b45591c1 Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Thu, 8 Apr 2021 11:20:02 -0400 Subject: [PATCH 22/36] CI: lowercase darwin --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0945f2f..cac5d10 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ defaults: &defaults working_directory: /home/nerves/build environment: ENV: CI - docker: + docker: - image: nervesproject/toolchains-nonexistant orbs: @@ -146,7 +146,7 @@ mac_xcode: &mac_xcode xcode: 11.7.0 mac_env: &mac_env - BUILD_OS: Darwin + BUILD_OS: darwin HOMEBREW_NO_AUTO_UPDATE: 1 linux_env: &linux_env From d92bdbbbb1ead52a1ac92e241a4238b7beeffb0e Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Thu, 8 Apr 2021 07:54:11 -1000 Subject: [PATCH 23/36] More debugging --- nerves_toolchain_ctng/build.sh | 4 ++++ nerves_toolchain_ctng/scripts/unmerge_defconfig.exs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index 47c0daf..9f219ea 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -282,6 +282,10 @@ build_gcc() # Configure logging when on CI (see crosstool-ng's build script) if [[ "$CI" = "true" ]]; then echo "Modifying logging for CI" + echo "In work dir: $WORK_DIR" + BUILD_DIR_CONTENTS=$(ls $WORK_DIR/build/.config) + echo "build dir contents: $BUILD_DIR_CONTENTS" + sed -i -e 's/^.*\(CT_LOG_ERROR\).*$/# \1 is not set/' \ -e 's/^.*\(CT_LOG_WARN\).*$/# \1 is not set/' \ -e 's/^.*\(CT_LOG_INFO\).*$/# \1 is not set/' \ diff --git a/nerves_toolchain_ctng/scripts/unmerge_defconfig.exs b/nerves_toolchain_ctng/scripts/unmerge_defconfig.exs index 4829d3e..6521f42 100755 --- a/nerves_toolchain_ctng/scripts/unmerge_defconfig.exs +++ b/nerves_toolchain_ctng/scripts/unmerge_defconfig.exs @@ -43,10 +43,14 @@ defmodule Unmerger do def main([original_defconfig, fragment_defconfig, resulting_defconfig]) do IO.puts("Unmerging #{resulting_defconfig} into #{original_defconfig} using #{fragment_defconfig}\n") orig = load(original_defconfig) + IO.inspect(orig, label: "orig") frag = load(fragment_defconfig) + IO.inspect(frag, label: "frag") result = load(resulting_defconfig) + IO.inspect(result, label: "result") desired = remove_fragments(result, frag) + IO.inspect(desired, label: "desired") if !is_similar_enough(orig, desired) do IO.puts("\n\nDifferences detected between the original defconfig and the resulting one!!!") From 5a3a3db7ca69518e81091068fc17e6b39da32591 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Thu, 8 Apr 2021 08:10:43 -1000 Subject: [PATCH 24/36] debug sed version --- nerves_toolchain_ctng/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index 9f219ea..d0d8539 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -281,7 +281,9 @@ build_gcc() # Configure logging when on CI (see crosstool-ng's build script) if [[ "$CI" = "true" ]]; then - echo "Modifying logging for CI" + echo "Modifying logging for CI2" + SED_VERSION=$(sed --version) + echo "SED version: $SED_VERSION" echo "In work dir: $WORK_DIR" BUILD_DIR_CONTENTS=$(ls $WORK_DIR/build/.config) echo "build dir contents: $BUILD_DIR_CONTENTS" From 30002215fe225df14049fbc774cda9d6af7bed11 Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Thu, 8 Apr 2021 14:52:07 -0400 Subject: [PATCH 25/36] Use path dep to pull in nerves_toolchain_ctng --- nerves_toolchain_aarch64_nerves_linux_gnu/mix.exs | 2 +- nerves_toolchain_armv5_nerves_linux_musleabi/mix.exs | 2 +- nerves_toolchain_armv6_nerves_linux_gnueabihf/mix.exs | 2 +- nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs | 2 +- nerves_toolchain_i586_nerves_linux_gnu/mix.exs | 2 +- nerves_toolchain_mipsel_nerves_linux_musl/mix.exs | 2 +- nerves_toolchain_x86_64_nerves_linux_gnu/mix.exs | 2 +- nerves_toolchain_x86_64_nerves_linux_musl/mix.exs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nerves_toolchain_aarch64_nerves_linux_gnu/mix.exs b/nerves_toolchain_aarch64_nerves_linux_gnu/mix.exs index 5e811b5..30fa754 100644 --- a/nerves_toolchain_aarch64_nerves_linux_gnu/mix.exs +++ b/nerves_toolchain_aarch64_nerves_linux_gnu/mix.exs @@ -48,7 +48,7 @@ defmodule NervesToolchainAarch64NervesLinuxGnu.MixProject do defp deps do [ {:nerves, "~> 1.4", runtime: false}, - {:nerves_toolchain_ctng, "~> 1.8.1", runtime: false} + {:nerves_toolchain_ctng, path: "../nerves_toolchain_ctng", runtime: false} ] end diff --git a/nerves_toolchain_armv5_nerves_linux_musleabi/mix.exs b/nerves_toolchain_armv5_nerves_linux_musleabi/mix.exs index f955fde..2d52790 100644 --- a/nerves_toolchain_armv5_nerves_linux_musleabi/mix.exs +++ b/nerves_toolchain_armv5_nerves_linux_musleabi/mix.exs @@ -48,7 +48,7 @@ defmodule NervesToolchainArmv5NervesLinuxMusleabi.MixProject do defp deps do [ {:nerves, "~> 1.0", runtime: false}, - {:nerves_toolchain_ctng, "~> 1.8.1", runtime: false} + {:nerves_toolchain_ctng, path: "../nerves_toolchain_ctng", runtime: false} ] end diff --git a/nerves_toolchain_armv6_nerves_linux_gnueabihf/mix.exs b/nerves_toolchain_armv6_nerves_linux_gnueabihf/mix.exs index d08691f..b61c3f5 100644 --- a/nerves_toolchain_armv6_nerves_linux_gnueabihf/mix.exs +++ b/nerves_toolchain_armv6_nerves_linux_gnueabihf/mix.exs @@ -48,7 +48,7 @@ defmodule NervesToolchainArmv6RpiLinuxGnueabihf.MixProject do defp deps do [ {:nerves, "~> 1.0", runtime: false}, - {:nerves_toolchain_ctng, "~> 1.8.1", runtime: false} + {:nerves_toolchain_ctng, path: "../nerves_toolchain_ctng", runtime: false} ] end diff --git a/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs b/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs index c79321c..a236446 100644 --- a/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs +++ b/nerves_toolchain_armv7_nerves_linux_gnueabihf/mix.exs @@ -49,7 +49,7 @@ defmodule NervesToolchainArmV7NervesLinuxGnueabihf.MixProject do [ #{:nerves, "~> 1.0", runtime: false}, {:nerves, github: "axelson/nerves", runtime: false, branch: "debug", override: true}, - {:nerves_toolchain_ctng, "~> 1.8.1", runtime: false} + {:nerves_toolchain_ctng, path: "../nerves_toolchain_ctng", runtime: false} ] end diff --git a/nerves_toolchain_i586_nerves_linux_gnu/mix.exs b/nerves_toolchain_i586_nerves_linux_gnu/mix.exs index 4ce5a13..c7ce345 100644 --- a/nerves_toolchain_i586_nerves_linux_gnu/mix.exs +++ b/nerves_toolchain_i586_nerves_linux_gnu/mix.exs @@ -48,7 +48,7 @@ defmodule NervesToolchainI586NervesLinuxGnu.MixProject do defp deps do [ {:nerves, "~> 1.0", runtime: false}, - {:nerves_toolchain_ctng, "~> 1.8.1", runtime: false} + {:nerves_toolchain_ctng, path: "../nerves_toolchain_ctng", runtime: false} ] end diff --git a/nerves_toolchain_mipsel_nerves_linux_musl/mix.exs b/nerves_toolchain_mipsel_nerves_linux_musl/mix.exs index e7b47c6..ae87b7e 100644 --- a/nerves_toolchain_mipsel_nerves_linux_musl/mix.exs +++ b/nerves_toolchain_mipsel_nerves_linux_musl/mix.exs @@ -48,7 +48,7 @@ defmodule NervesToolchainMipselNervesLinuxMusl.MixProject do defp deps do [ {:nerves, "~> 1.0", runtime: false}, - {:nerves_toolchain_ctng, "~> 1.8.1", runtime: false} + {:nerves_toolchain_ctng, path: "../nerves_toolchain_ctng", runtime: false} ] end diff --git a/nerves_toolchain_x86_64_nerves_linux_gnu/mix.exs b/nerves_toolchain_x86_64_nerves_linux_gnu/mix.exs index 0a926c5..e65c319 100644 --- a/nerves_toolchain_x86_64_nerves_linux_gnu/mix.exs +++ b/nerves_toolchain_x86_64_nerves_linux_gnu/mix.exs @@ -48,7 +48,7 @@ defmodule NervesToolchainX8664NervesLinuxGnu.MixProject do defp deps do [ {:nerves, "~> 1.0", runtime: false}, - {:nerves_toolchain_ctng, "~> 1.8.1", runtime: false} + {:nerves_toolchain_ctng, path: "../nerves_toolchain_ctng", runtime: false} ] end diff --git a/nerves_toolchain_x86_64_nerves_linux_musl/mix.exs b/nerves_toolchain_x86_64_nerves_linux_musl/mix.exs index 04a268b..91544fe 100644 --- a/nerves_toolchain_x86_64_nerves_linux_musl/mix.exs +++ b/nerves_toolchain_x86_64_nerves_linux_musl/mix.exs @@ -48,7 +48,7 @@ defmodule NervesToolchainX8664NervesLinuxMusl.MixProject do defp deps do [ {:nerves, "~> 1.0", runtime: false}, - {:nerves_toolchain_ctng, "~> 1.8.1", runtime: false} + {:nerves_toolchain_ctng, path: "../nerves_toolchain_ctng", runtime: false} ] end From f2bd6b8ab353891545dbb5a506c7284555f8343e Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sat, 10 Apr 2021 09:12:59 -1000 Subject: [PATCH 26/36] Try to use correct sed version (for mac) Although I'm not clear where `$SED` is coming from in nerves_toolchain_ctng/build.sh --- nerves_toolchain_ctng/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index d0d8539..c49ac64 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -282,13 +282,13 @@ build_gcc() # Configure logging when on CI (see crosstool-ng's build script) if [[ "$CI" = "true" ]]; then echo "Modifying logging for CI2" - SED_VERSION=$(sed --version) - echo "SED version: $SED_VERSION" echo "In work dir: $WORK_DIR" BUILD_DIR_CONTENTS=$(ls $WORK_DIR/build/.config) echo "build dir contents: $BUILD_DIR_CONTENTS" + SED_VERSION=$($SED --version) + echo "SED version: $SED_VERSION" - sed -i -e 's/^.*\(CT_LOG_ERROR\).*$/# \1 is not set/' \ + $SED -i -e 's/^.*\(CT_LOG_ERROR\).*$/# \1 is not set/' \ -e 's/^.*\(CT_LOG_WARN\).*$/# \1 is not set/' \ -e 's/^.*\(CT_LOG_INFO\).*$/# \1 is not set/' \ -e 's/^.*\(CT_LOG_EXTRA\).*$/\1=y/' \ From fc915a9135db3a0a529b21d26bc326a1e57f2b8c Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sat, 10 Apr 2021 09:45:22 -1000 Subject: [PATCH 27/36] print sed Also formatting fixes --- nerves_toolchain_ctng/build.sh | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index c49ac64..dc1e14e 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -227,20 +227,22 @@ build_gcc() ./bootstrap fi if [[ $BUILD_OS = "freebsd" ]]; then - SED=/usr/local/bin/gsed MAKE=/usr/local/bin/gmake PATCH=/usr/local/bin/gpatch ./configure --prefix="$LOCAL_INSTALL_DIR" - gmake - gmake install + SED=/usr/local/bin/gsed MAKE=/usr/local/bin/gmake PATCH=/usr/local/bin/gpatch ./configure --prefix="$LOCAL_INSTALL_DIR" + gmake + gmake install elif [[ $BUILD_OS = "darwin" ]]; then # Homebrew's gcc is gcc-10 BINUTILS=$(brew --prefix binutils) CC=gcc-10 CXX=g++-10 OBJDUMP=$BINUTILS/bin/gobjdump OBJCOPY=$BINUTILS/bin/gobjcopy READELF=$BINUTILS/bin/greadelf \ - CFLAGS="$CROSSTOOL_CFLAGS" LDFLAGS="$CROSSTOOL_LDFLAGS" SED=$HOMEBREW_PREFIX/bin/gsed MAKE=$HOMEBREW_PREFIX/bin/gmake ./configure --prefix="$LOCAL_INSTALL_DIR" - gmake - gmake install + CFLAGS="$CROSSTOOL_CFLAGS" LDFLAGS="$CROSSTOOL_LDFLAGS" SED=$HOMEBREW_PREFIX/bin/gsed MAKE=$HOMEBREW_PREFIX/bin/gmake ./configure --prefix="$LOCAL_INSTALL_DIR" + echo "BUILD_OS is darwin and sed is $SED" + gmake + gmake install else - ./configure --prefix="$LOCAL_INSTALL_DIR" - make - make install + ./configure --prefix="$LOCAL_INSTALL_DIR" + make + make install + SED=sed fi # Check for ct-ng @@ -285,8 +287,10 @@ build_gcc() echo "In work dir: $WORK_DIR" BUILD_DIR_CONTENTS=$(ls $WORK_DIR/build/.config) echo "build dir contents: $BUILD_DIR_CONTENTS" - SED_VERSION=$($SED --version) - echo "SED version: $SED_VERSION" + + #SED_VERSION="$($SED --version)" + #echo "SED version: $SED_VERSION" + echo "SED is: $SED" $SED -i -e 's/^.*\(CT_LOG_ERROR\).*$/# \1 is not set/' \ -e 's/^.*\(CT_LOG_WARN\).*$/# \1 is not set/' \ From cf998fcff98c33fead22b5033e7b4429a922d5f8 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sat, 10 Apr 2021 10:21:06 -1000 Subject: [PATCH 28/36] variables --- nerves_toolchain_ctng/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index dc1e14e..55d883d 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -236,6 +236,8 @@ build_gcc() CC=gcc-10 CXX=g++-10 OBJDUMP=$BINUTILS/bin/gobjdump OBJCOPY=$BINUTILS/bin/gobjcopy READELF=$BINUTILS/bin/greadelf \ CFLAGS="$CROSSTOOL_CFLAGS" LDFLAGS="$CROSSTOOL_LDFLAGS" SED=$HOMEBREW_PREFIX/bin/gsed MAKE=$HOMEBREW_PREFIX/bin/gmake ./configure --prefix="$LOCAL_INSTALL_DIR" echo "BUILD_OS is darwin and sed is $SED" + SED2=$HOMEBREW_PREFIX/bin/gsed + echo "BUILD_OS is darwin and sed2 is $SED2" gmake gmake install else From fb904b5055b9634bca0c98183c817b0aed08e02e Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sat, 10 Apr 2021 10:40:36 -1000 Subject: [PATCH 29/36] sed was only being set for a single command --- nerves_toolchain_ctng/build.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index 55d883d..9d38190 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -198,6 +198,14 @@ gcc_tuple_underscores() build_gcc() { + if [[ $BUILD_OS = "freebsd" ]]; then + SED=/usr/local/bin/gsed + elif [[ $BUILD_OS = "darwin" ]]; then + SED=$HOMEBREW_PREFIX/bin/gsed + else + SED="sed" + fi + # Build and install ct-ng to the work directory cd "$WORK_DIR" ln -sf "$DL_DIR" dl @@ -234,17 +242,13 @@ build_gcc() # Homebrew's gcc is gcc-10 BINUTILS=$(brew --prefix binutils) CC=gcc-10 CXX=g++-10 OBJDUMP=$BINUTILS/bin/gobjdump OBJCOPY=$BINUTILS/bin/gobjcopy READELF=$BINUTILS/bin/greadelf \ - CFLAGS="$CROSSTOOL_CFLAGS" LDFLAGS="$CROSSTOOL_LDFLAGS" SED=$HOMEBREW_PREFIX/bin/gsed MAKE=$HOMEBREW_PREFIX/bin/gmake ./configure --prefix="$LOCAL_INSTALL_DIR" - echo "BUILD_OS is darwin and sed is $SED" - SED2=$HOMEBREW_PREFIX/bin/gsed - echo "BUILD_OS is darwin and sed2 is $SED2" + CFLAGS="$CROSSTOOL_CFLAGS" LDFLAGS="$CROSSTOOL_LDFLAGS" MAKE=$HOMEBREW_PREFIX/bin/gmake ./configure --prefix="$LOCAL_INSTALL_DIR" gmake gmake install else ./configure --prefix="$LOCAL_INSTALL_DIR" make make install - SED=sed fi # Check for ct-ng @@ -290,9 +294,9 @@ build_gcc() BUILD_DIR_CONTENTS=$(ls $WORK_DIR/build/.config) echo "build dir contents: $BUILD_DIR_CONTENTS" - #SED_VERSION="$($SED --version)" - #echo "SED version: $SED_VERSION" echo "SED is: $SED" + SED_VERSION="$($SED --version)" + echo "SED version: $SED_VERSION" $SED -i -e 's/^.*\(CT_LOG_ERROR\).*$/# \1 is not set/' \ -e 's/^.*\(CT_LOG_WARN\).*$/# \1 is not set/' \ From 098ac39dc8a462b72acd087c2dd0276429df0fa8 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sun, 11 Apr 2021 11:37:03 -1000 Subject: [PATCH 30/36] Free up extra space --- .circleci/config.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index cac5d10..f7c17bd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -77,6 +77,17 @@ build_mac: &build_mac #xcode: 11.7.0 steps: - checkout + # Free up extra space on macOS + # https://support.circleci.com/hc/en-us/articles/360037142773-Freeing-up-Disk-Space-on-macOS + - run: + name: df + command: df -h + - run: + name: Free up extra space + command: sudo rm -rf /Library/Developer/CoreSimulator/Profiles/Runtimes/ + - run: + name: df + command: df -h - run: name: Install cowsay command: brew install cowsay From 635afdacf4c9d07808dbf50158365588ecb73772 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sun, 11 Apr 2021 14:40:42 -1000 Subject: [PATCH 31/36] verbose mode on hdiutil --- build_release.sh | 4 ++++ nerves_toolchain_ctng/build.sh | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build_release.sh b/build_release.sh index bc22a82..c9e78eb 100755 --- a/build_release.sh +++ b/build_release.sh @@ -30,6 +30,10 @@ for CONFIG in $CONFIGS; do cd $CONFIG mix deps.get mix nerves.artifact --path ../ + echo "Done building $CONFIG" + # TMP + echo "df -h:" + df -h cd ../ done diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index 9d38190..6dd7a61 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -385,7 +385,7 @@ assemble_dmg() rm -f "$DMG_PATH" hdiutil create -fs "Case-sensitive HFS+" -volname nerves-toolchain \ - -srcfolder "$WORK_DIR/x-tools/$TARGET_TUPLE/." \ + -srcfolder "$WORK_DIR/x-tools/$TARGET_TUPLE/." -verbose \ "$DMG_PATH" } @@ -413,6 +413,7 @@ finalize_products() # On OSX, always create .dmg files for debugging builds and # fix the case issues. assemble_dmg + echo "Done building dmg" # Prune out filenames with case conflicts and before make a tarball fix_kernel_case_conflicts From 19481aeabcefba4b64831082550e7eb5d70fe108 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Wed, 14 Apr 2021 20:23:40 -1000 Subject: [PATCH 32/36] Slightly more debugging --- nerves_toolchain_ctng/build.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index 6dd7a61..1d7a731 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -291,12 +291,6 @@ build_gcc() if [[ "$CI" = "true" ]]; then echo "Modifying logging for CI2" echo "In work dir: $WORK_DIR" - BUILD_DIR_CONTENTS=$(ls $WORK_DIR/build/.config) - echo "build dir contents: $BUILD_DIR_CONTENTS" - - echo "SED is: $SED" - SED_VERSION="$($SED --version)" - echo "SED version: $SED_VERSION" $SED -i -e 's/^.*\(CT_LOG_ERROR\).*$/# \1 is not set/' \ -e 's/^.*\(CT_LOG_WARN\).*$/# \1 is not set/' \ @@ -311,6 +305,8 @@ build_gcc() "$WORK_DIR/build/.config" fi + echo "BEFORE DOTS" + # Start building and print dots to keep CI from killing the build due # to console inactivity. $PREFIX "$CTNG" $CTNG_BUILD & @@ -319,10 +315,13 @@ build_gcc() while ps -p $build_pid >/dev/null; do sleep 12 printf "." + echo "DOT $(date)" done } & local keepalive_pid=$! + echo "Waiting for $build_pid build to finish" + # Wait for the build to finish wait $build_pid 2>/dev/null From d32eb2d40fd6a0952d0104b9a26799de1299e3d1 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sat, 17 Apr 2021 08:42:26 -1000 Subject: [PATCH 33/36] debug --- nerves_toolchain_ctng/build.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index 1d7a731..00538db 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -361,7 +361,9 @@ save_build_info() # Save useful information if we ever need to reproduce the toolchain TARGET_TUPLE=$(gcc_tuple) echo "$NERVES_TOOLCHAIN_VERSION" > "$GCC_INSTALL_DIR/$TARGET_TUPLE/nerves-toolchain.tag" + echo "running: cp $CTNG_CONFIG $GCC_INSTALL_DIR/$TARGET_TUPLE/ct-ng.defconfig" cp "$CTNG_CONFIG" "$GCC_INSTALL_DIR/$TARGET_TUPLE/ct-ng.defconfig" + echo "running: cp $WORK_DIR/build/.config $GCC_INSTALL_DIR/$TARGET_TUPLE/ct-ng.config" cp "$WORK_DIR/build/.config" "$GCC_INSTALL_DIR/$TARGET_TUPLE/ct-ng.config" } @@ -382,9 +384,11 @@ assemble_dmg() TARGET_TUPLE=$(gcc_tuple) DMG_PATH=$WORK_DIR/$(toolchain_base_name).dmg + echo "Removing existing dmg path: $DMG_PATH $(date)" + df -h rm -f "$DMG_PATH" hdiutil create -fs "Case-sensitive HFS+" -volname nerves-toolchain \ - -srcfolder "$WORK_DIR/x-tools/$TARGET_TUPLE/." -verbose \ + -srcfolder "$WORK_DIR/x-tools/$TARGET_TUPLE/." -debug \ "$DMG_PATH" } @@ -406,11 +410,13 @@ fix_kernel_case_conflicts() finalize_products() { + echo "Beginning of finalize_products" save_build_info if [[ $BUILD_OS = "darwin" ]]; then # On OSX, always create .dmg files for debugging builds and # fix the case issues. + echo "Beging building dmg" assemble_dmg echo "Done building dmg" From 0d15247f6419f84b17d4bcf1d63b83bb903acbcb Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sun, 18 Apr 2021 07:23:59 -1000 Subject: [PATCH 34/36] clean work dir --- nerves_toolchain_ctng/build.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index 00538db..57e3646 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -340,14 +340,15 @@ build_gcc() rm -f "$GCC_INSTALL_DIR/$TARGET_TUPLE/build.log.bz2" # Clean up crosstool-ng's work directory if we put it in a global location - if [[ "$CI" = "true" ]]; then - echo "Not cleaning up work directory since CI build" - else + echo "Cleaning up work directory since CI build" + # if [[ "$CI" = "true" ]]; then + # echo "Not cleaning up work directory since CI build" + # else if [[ -e "$CT_WORK_DIR" ]]; then chmod -R u+w "$CT_WORK_DIR" rm -fr "$CT_WORK_DIR" fi - fi + # fi } toolchain_base_name() From e037d0a3d4ea9a9a7d72fd83338aefa616db100d Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Mon, 19 Apr 2021 20:18:09 -1000 Subject: [PATCH 35/36] Debug space --- nerves_toolchain_ctng/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index 57e3646..ba3b692 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -349,6 +349,8 @@ build_gcc() rm -fr "$CT_WORK_DIR" fi # fi + df -h + du -hs * } toolchain_base_name() From 38ff0254af30a19346c184afdfc2292740222f04 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Thu, 20 May 2021 08:12:21 -1000 Subject: [PATCH 36/36] try to figure out where the cleaning can be done --- build_release.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_release.sh b/build_release.sh index c9e78eb..e4bdf0c 100755 --- a/build_release.sh +++ b/build_release.sh @@ -34,6 +34,8 @@ for CONFIG in $CONFIGS; do # TMP echo "df -h:" df -h + echo "ls -lh *" + ls -lh * cd ../ done