From 885748040b3120fabae19402b87bdc8eff5bf63e Mon Sep 17 00:00:00 2001 From: Bryan Hundven Date: Tue, 5 Mar 2024 15:14:12 -0800 Subject: [PATCH 1/2] Fix homebrew path Homebrew changed it's default install path from `/usr/local` to `/opt/homebrew` a while back. Hardcoding the path is a bad idea, so instead use `$(brew --prefix)` to get the prefix of the path for tools. Also fix some [shellcheck](https://github.com/koalaman/shellcheck) issues. Signed-off-by: Bryan Hundven --- .github/workflows/continuous-integration-workflow.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 4dcac522..fed014f7 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -26,12 +26,15 @@ jobs: - name: "build ct-ng" run: | if [ "$RUNNER_OS" == "macOS" ]; then - export PATH="$PATH:/usr/local/opt/binutils/bin" - export CPPFLAGS="-I/usr/local/opt/ncurses/include -I/usr/local/opt/gettext/include" - export LDFLAGS="-L/usr/local/opt/ncurses/lib -L/usr/local/opt/gettext/lib" + PATH="$PATH:$(brew --prefix)/opt/binutils/bin" + export PATH + CPPFLAGS="-I$(brew --prefix)/opt/ncurses/include -I$(brew --prefix)/opt/gettext/include" + export CPPFLAGS + LDFLAGS="-L$(brew --prefix)/opt/ncurses/lib -L$(brew --prefix)/opt/gettext/lib" + export LDFLAGS fi ./bootstrap - ./configure --prefix=$PWD/.local/ + ./configure --prefix="$PWD/.local/" make make install tar -cf ct-ng.tar .local/ From 149916c8d25d39892206b56cbd4dda4f693ad67a Mon Sep 17 00:00:00 2001 From: Bryan Hundven Date: Tue, 5 Mar 2024 15:32:09 -0800 Subject: [PATCH 2/2] Update action versions and more shellcheck fixes Update action versions to latest. Signed-off-by: Bryan Hundven --- .github/workflows/build-toolchains.yml | 20 +++++++++---------- .../continuous-integration-workflow.yml | 12 +++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-toolchains.yml b/.github/workflows/build-toolchains.yml index 064fea8c..1031951a 100644 --- a/.github/workflows/build-toolchains.yml +++ b/.github/workflows/build-toolchains.yml @@ -44,18 +44,18 @@ jobs: run: | cd .. rmdir crosstool-ng - hdiutil create ${HOME}/Workspace.sparseimage -volname crosstool-ng -type SPARSE -size 20g -fs HFSX - hdiutil mount ${HOME}/Workspace.sparseimage -mountroot /Users/runner/work/crosstool-ng + hdiutil create "${HOME}/Workspace.sparseimage" -volname crosstool-ng -type SPARSE -size 20g -fs HFSX + hdiutil mount "${HOME}/Workspace.sparseimage" -mountroot /Users/runner/work/crosstool-ng cd crosstool-ng - name: download ct-ng - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: crosstool.${{ matrix.host }} - name: extract ct-ng run: | tar -xf ct-ng.tar - name: download tarballs - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: src.tar key: src.tar-${{ hashFiles('.local/share/crosstool-ng/packages') }}-${{ hashFiles('.local/share/crosstool-ng/samples') }} @@ -67,16 +67,16 @@ jobs: if: ${{ runner.os == 'Linux' }} run: | sudo apt-get install -y gperf help2man libtool-bin meson ninja-build - echo "${{ github.workspace }}/.local/bin" >> $GITHUB_PATH + echo "${{ github.workspace }}/.local/bin" >> "$GITHUB_PATH" - name: prereq macOS if: ${{ runner.os == 'macOS' }} run: | brew install autoconf automake bash binutils gawk gnu-sed \ gnu-tar help2man make ncurses pkg-config - echo "${{ github.workspace }}/.local/bin" >> $GITHUB_PATH + echo "${{ github.workspace }}/.local/bin" >> "$GITHUB_PATH" - name: download x86_64-w64-mingw32.${{ matrix.host }} tarball if: ${{ inputs.canadian-cross }} - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: x86_64-w64-mingw32.${{ matrix.host }}.tar - name: install x86_64-w64-mingw32.${{ matrix.host }} toolchain @@ -85,7 +85,7 @@ jobs: mkdir -p ${{ github.workspace }}/x86_64-w64-mingw32 tar -C ${{ github.workspace }}/x86_64-w64-mingw32 \ -xf x86_64-w64-mingw32.${{ matrix.host }}.tar - echo "${{ github.workspace }}/x86_64-w64-mingw32/bin" >> $GITHUB_PATH + echo "${{ github.workspace }}/x86_64-w64-mingw32/bin" >> "$GITHUB_PATH" - name: build ${{ matrix.sample }} for ${{ matrix.host }} run: | mkdir -p src @@ -103,13 +103,13 @@ jobs: -cf ${{ matrix.sample }}.${{ matrix.host }}.tar . - name: upload ${{ matrix.sample }}.${{ matrix.host }} tarball if: ${{ matrix.sample == 'x86_64-w64-mingw32' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.sample }}.${{ matrix.host }}.tar path: | ${{ matrix.sample }}.${{ matrix.host }}.tar - name: upload log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.sample }}.${{ matrix.host }}.log path: | diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index fed014f7..132dae30 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -13,7 +13,7 @@ jobs: host: ["ubuntu-22.04", "macos-latest"] steps: - name: "clone" - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "prereq Linux" if: ${{ runner.os == 'Linux' }} run: | @@ -39,12 +39,12 @@ jobs: make install tar -cf ct-ng.tar .local/ - name: "upload ct-ng" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: crosstool.${{ matrix.host }} path: ct-ng.tar - name: "upload config.log" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: config.log.${{ matrix.host }} path: config.log @@ -58,7 +58,7 @@ jobs: host: ["ubuntu-22.04"] steps: - name: "download ct-ng" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: crosstool.${{ matrix.host }} - name: "extract ct-ng" @@ -66,7 +66,7 @@ jobs: tar -xf ct-ng.tar - name: cache tarballs id: cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: src.tar key: src.tar-${{ hashFiles('.local/share/crosstool-ng/packages') }}-${{ hashFiles('.local/share/crosstool-ng/samples') }} @@ -81,7 +81,7 @@ jobs: if: ${{ runner.os == 'Linux' }} run: | sudo apt-get install -y gperf help2man libtool-bin - echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH + echo "$GITHUB_WORKSPACE/.local/bin" >> "$GITHUB_PATH" - name: "ct-ng source" run: | mkdir -p src