aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-toolchains.yml42
-rw-r--r--.github/workflows/continuous-integration-workflow.yml70
2 files changed, 66 insertions, 46 deletions
diff --git a/.github/workflows/build-toolchains.yml b/.github/workflows/build-toolchains.yml
index b762bf59..1f0347aa 100644
--- a/.github/workflows/build-toolchains.yml
+++ b/.github/workflows/build-toolchains.yml
@@ -19,62 +19,64 @@ jobs:
runs-on: ${{ matrix.host }}
strategy:
matrix:
- host: ["ubuntu-22.04", "macos-latest"]
+ host: ["ubuntu-22.04", "macos-13"]
sample: ${{ fromJSON(inputs.samples) }}
exclude:
# Exclude both glibc & uClibc ARC Linux toolchains as
# there's no known use of ARC Linux toolchains on Mac,
# and anyway glibc fails to build for ARC700,
# see https://github.com/crosstool-ng/crosstool-ng/pull/1456#issuecomment-779150246
- - {host: "macos-latest", sample: "arc-multilib-linux-gnu"}
- - {host: "macos-latest", sample: "arc-multilib-linux-uclibc"}
+ - {host: "macos-13", sample: "arc-multilib-linux-gnu"}
+ - {host: "macos-13", sample: "arc-multilib-linux-uclibc"}
# Exclude mips*-*-linux-gnu because of <byteswap.h> usage in
# elf-entry.c for linux kernel headers. <byteswap.h> is a GNU
# extension and doesn't exist on MacOS X
- - {host: "macos-latest", sample: "mips-unknown-linux-gnu"}
- - {host: "macos-latest", sample: "mips64-unknown-linux-gnu"}
+ - {host: "macos-13", sample: "mips-unknown-linux-gnu"}
+ - {host: "macos-13", sample: "mips64-unknown-linux-gnu"}
# Exclude x86_64-w64-mingw32,x86_64-pc-linux-gnu because it crashes on m4 build with
# a Segmentation fault
- - {host: "macos-latest", sample: "x86_64-w64-mingw32,x86_64-pc-linux-gnu"}
+ - {host: "macos-13", sample: "x86_64-w64-mingw32,x86_64-pc-linux-gnu"}
steps:
- name: create case sensitive workspace volume for macOS
if: ${{ runner.os == 'macOS' }}
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/download-artifact@v3
+ uses: actions/cache/restore@v4
with:
- name: src.tar
+ path: src.tar
+ key: src.tar-${{ hashFiles('.local/share/crosstool-ng/packages') }}-${{ hashFiles('.local/share/crosstool-ng/samples') }}
- name: extract tarballs
+ continue-on-error: true
run: |
tar -xvf src.tar
- name: prereq Linux
if: ${{ runner.os == 'Linux' }}
run: |
- sudo apt-get install -y gperf help2man libtool-bin meson ninja-build
- echo "${{ github.workspace }}/.local/bin" >> $GITHUB_PATH
+ sudo apt-get update && sudo apt-get install -y bison flex gperf help2man libtool-bin meson ninja-build texinfo
+ 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
+ gnu-tar help2man make meson ncurses ninja pkg-config texinfo libtool
+ 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
@@ -83,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
@@ -92,7 +94,7 @@ jobs:
sed -i -e '/CT_LOCAL_TARBALLS_DIR/s/HOME/CT_TOP_DIR/' .config
sed -i -e '/CT_PREFIX_DIR/s/HOME/CT_TOP_DIR/' .config
sed -i -e '/CT_GLIBC_ENABLE_DEBUG/s/y$/n/' .config
- test ${{ matrix.host }} = "macos-latest" && sed -i -e '/CT_GDB_CROSS_PYTHON/s/y$/n/' .config
+ test ${{ matrix.host }} = "macos-13" && sed -i -e '/CT_GDB_CROSS_PYTHON/s/y$/n/' .config
ct-ng build
- name: create ${{ matrix.sample }}.${{ matrix.host }} tarball
if: ${{ matrix.sample == 'x86_64-w64-mingw32' }}
@@ -101,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 dcb37031..c118faa5 100644
--- a/.github/workflows/continuous-integration-workflow.yml
+++ b/.github/workflows/continuous-integration-workflow.yml
@@ -10,38 +10,41 @@ jobs:
runs-on: ${{ matrix.host }}
strategy:
matrix:
- host: ["ubuntu-22.04", "macos-latest"]
+ host: ["ubuntu-22.04", "macos-13"]
steps:
- name: "clone"
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: "prereq Linux"
if: ${{ runner.os == 'Linux' }}
run: |
- sudo apt-get install -y gperf help2man libtool-bin meson ninja-build
+ sudo apt-get update && sudo apt-get install -y bison flex gperf help2man libtool-bin meson ninja-build texinfo
- name: "prereq macOS"
if: ${{ runner.os == 'macOS' }}
run: |
brew install autoconf automake bash binutils gawk gnu-sed \
- gnu-tar help2man make ncurses
+ gnu-tar help2man libtool make meson ncurses ninja texinfo
- 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/
- 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
@@ -55,21 +58,34 @@ 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"
run: |
tar -xf ct-ng.tar
+ - name: cache tarballs
+ id: cache
+ uses: actions/cache@v4
+ with:
+ path: src.tar
+ key: src.tar-${{ hashFiles('.local/share/crosstool-ng/packages') }}-${{ hashFiles('.local/share/crosstool-ng/samples') }}
+ restore-keys: |
+ src.tar-${{ hashFiles('.local/share/crosstool-ng/packages') }}-
+ src.tar-
+ - name: extract tarballs
+ run: |
+ tar -xvf src.tar || true
+ touch stamp
- name: "prereq Linux"
if: ${{ runner.os == 'Linux' }}
run: |
- sudo apt-get install -y gperf help2man libtool-bin
- echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH
+ sudo apt-get update && sudo apt-get install -y bison flex gperf help2man libtool-bin texinfo
+ echo "$GITHUB_WORKSPACE/.local/bin" >> "$GITHUB_PATH"
- name: "ct-ng source"
run: |
mkdir -p src
- for sample in aarch64-unknown-linux-gnu arm-picolibc-eabi \
+ for sample in aarch64-unknown-linux-gnu arm-none-eabi \
arm-unknown-linux-musleabi armv6-nommu-linux-uclibcgnueabi \
x86_64-w64-mingw32; do \
ct-ng $sample; \
@@ -79,15 +95,12 @@ jobs:
sed -i -e 's/^.*CT_COMP_TOOLS_BISON.*$/CT_COMP_TOOLS_BISON=y/' .config; \
sed -i -e 's/^.*CT_COMP_TOOLS_M4.*$/CT_COMP_TOOLS_M4=y/' .config; \
sed -i -e 's/^.*CT_COMP_TOOLS_MAKE.*$/CT_COMP_TOOLS_MAKE=y/' .config; \
+ sed -i -e 's/^.*CT_DOWNLOAD_WGET_OPTIONS.*$/CT_DOWNLOAD_WGET_OPTIONS="--tries=3 -nc --progress=dot:binary --no-use-server-timestamps"/' .config; \
ct-ng olddefconfig; \
ct-ng source; \
done
+ find src -type f -not -newer stamp -delete -print
tar -cvf src.tar src
- - name: "upload sources"
- uses: actions/upload-artifact@v3
- with:
- name: src.tar
- path: src.tar
toolchains:
needs: [crosstool, tarballs]
@@ -96,6 +109,7 @@ jobs:
samples: >-
[
"aarch64-unknown-linux-gnu",
+ "aarch64-unknown-linux-musl",
"arc-multilib-elf32",
"arc-multilib-linux-gnu",
"arc-multilib-linux-uclibc",
@@ -104,15 +118,19 @@ jobs:
"arm-unknown-linux-musleabi",
"armv6-nommu-linux-uclibcgnueabi",
"avr",
+ "hppa-unknown-linux-gnu",
"i686-w64-mingw32",
"loongarch64-unknown-linux-gnu",
+ "loongarch64-unknown-linux-musl",
"mips-unknown-elf",
"mips-unknown-linux-gnu",
"mips64-unknown-linux-gnu",
"powerpc-unknown-linux-gnu",
"powerpc64-unknown-linux-gnu",
+ "powerpc64-unknown-linux-musl",
"riscv32-unknown-elf",
"riscv64-unknown-elf",
+ "riscv64-unknown-linux-gnu",
"s390-unknown-linux-gnu",
"sh-unknown-elf",
"sparc-unknown-linux-gnu",
@@ -122,10 +140,10 @@ jobs:
"xtensa-fsf-linux-uclibc"
]
- canadian-cross:
- needs: [toolchains]
- uses: ./.github/workflows/build-toolchains.yml
- with:
- samples: >-
- ["x86_64-w64-mingw32,x86_64-pc-linux-gnu"]
- canadian-cross: true
+# canadian-cross:
+# needs: [toolchains]
+# uses: ./.github/workflows/build-toolchains.yml
+# with:
+# samples: >-
+# ["x86_64-w64-mingw32,x86_64-pc-linux-gnu"]
+# canadian-cross: true