diff --git a/racket/src/ChezScheme/.github/scripts/matting.sh b/.github/scripts/matting.sh similarity index 100% rename from racket/src/ChezScheme/.github/scripts/matting.sh rename to .github/scripts/matting.sh diff --git a/racket/src/ChezScheme/.github/scripts/summary b/.github/scripts/summary similarity index 100% rename from racket/src/ChezScheme/.github/scripts/summary rename to .github/scripts/summary diff --git a/racket/src/ChezScheme/.github/scripts/test.sh b/.github/scripts/test.sh similarity index 76% rename from racket/src/ChezScheme/.github/scripts/test.sh rename to .github/scripts/test.sh index 3e84be2a6e..86119da873 100755 --- a/racket/src/ChezScheme/.github/scripts/test.sh +++ b/.github/scripts/test.sh @@ -1,4 +1,6 @@ #!/bin/bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + runmats() { echo make allxhelp "$@" make -C ${MACH}/mats allxhelp "$@" 2>&1 | tee -a Make.out | grep '^matting ' @@ -13,7 +15,7 @@ runmats o=3 cp0=t eval=interpret if [ -f ${MACH}/mats/summary ]; then cat ${MACH}/mats/summary - diff -q .github/scripts/summary ${MACH}/mats/summary + diff -q ${DIR}/summary ${MACH}/mats/summary exit $? else exit 1 diff --git a/.github/workflows/chez-build.yml b/.github/workflows/chez-build.yml new file mode 100644 index 0000000000..ab87ea859f --- /dev/null +++ b/.github/workflows/chez-build.yml @@ -0,0 +1,88 @@ +name: Solo Chez Build + +on: + push: + paths: + - "racket/src/ChezScheme/**" + - ".github/scripts/**" + - ".github/workflows/chez-build.yml" + - "Makefile" + pull_request: + paths: + - "racket/src/ChezScheme/**" + - ".github/scripts/**" + - ".github/workflows/chez-build.yml" + - "Makefile" + +jobs: + build-linux: + runs-on: ubuntu-18.04 + + strategy: + fail-fast: false + matrix: + mach: ['i3le', 'ti3le', 'a6le', 'ta6le'] + + env: + MACH: ${{ matrix.mach }} + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 50 + - name: Download pb boot files + run: make fetch-pb + - name: Proceed with TARGET_MACHINE == ${{ matrix.mach }} + run: echo $TARGET_MACHINE + - name: Install libs for 32-bit + if: matrix.mach == 'i3le' || matrix.mach == 'ti3le' + run: | + sudo dpkg --add-architecture i386 + sudo apt-get update + sudo apt-get install -y gcc-multilib lib32ncurses5-dev libx32ncurses5-dev uuid-dev:i386 libssl-dev:i386 + - name: Install libs for 64-bit + run: | + sudo apt-get update + sudo apt-get install -y libncurses5-dev uuid-dev libssl-dev + - name: Build Chez with PB boot files + working-directory: racket/src/ChezScheme + run: | + ./configure --pb + make -j$(($(nproc) + 1)) -l$(nproc) ${{ matrix.mach }}.bootquick + - name: Build Chez with native boot files + working-directory: racket/src/ChezScheme + run: | + ./configure -m=${{ matrix.mach }} + make -j$(($(nproc) + 1)) -l$(nproc) + - name: Test Chez + working-directory: racket/src/ChezScheme + run: ../../../.github/scripts/test.sh + + build-arm64: + runs-on: [self-hosted, ARM64, Linux] + container: + image: racket/racket-ci:latest + options: --init + + env: + MACH: tarm64le + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 50 + - name: Download pb boot files + run: make fetch-pb + - name: Build Chez with PB boot files + working-directory: racket/src/ChezScheme + run: | + ./configure --pb + make -j$(($(nproc) + 1)) -l$(nproc) ${MACH}.bootquick + - name: Build Chez with native boot files + working-directory: racket/src/ChezScheme + run: | + ./configure -m=${MACH} + make -j$(($(nproc) + 1)) -l$(nproc) + - name: Test Chez + working-directory: racket/src/ChezScheme + run: ../../../.github/scripts/test.sh diff --git a/racket/src/ChezScheme/.github/scripts/build.sh b/racket/src/ChezScheme/.github/scripts/build.sh deleted file mode 100755 index e65bce4afd..0000000000 --- a/racket/src/ChezScheme/.github/scripts/build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -e -o pipefail -echo Building Chez Scheme... -./configure -m=$MACH -make -case $MACH in - *a6nt) - curl -Ls https://github.com/burgerrg/win-iconv/releases/download/v0.0.9/iconv-x64.dll > "$TARGET_MACHINE"/bin/"$TARGET_MACHINE"/iconv.dll - ;; - *i3nt) - curl -Ls https://github.com/burgerrg/win-iconv/releases/download/v0.0.9/iconv-x86.dll > "$TARGET_MACHINE"/bin/"$TARGET_MACHINE"/iconv.dll - ;; -esac diff --git a/racket/src/ChezScheme/.github/workflows/build.yml b/racket/src/ChezScheme/.github/workflows/build.yml deleted file mode 100644 index 57fe4395c5..0000000000 --- a/racket/src/ChezScheme/.github/workflows/build.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Build CI - -on: [push, pull_request] - -jobs: - - build-linux: - runs-on: ubuntu-18.04 - - strategy: - fail-fast: false - matrix: - mach: ['i3le', 'ti3le', 'a6le', 'ta6le'] - - env: - MACH: ${{ matrix.mach }} - - steps: - - uses: Bogdanp/setup-racket@v0.8 - with: - distribution: 'minimal' # minimal is enough - variant: 'CS' # lets dog-food CS - version: 'current' - - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: Proceed with TARGET_MACHINE == ${{ matrix.mach }} - run: echo $TARGET_MACHINE - - name: Install libs for 32-bit - if: matrix.mach == 'i3le' || matrix.mach == 'ti3le' - run: | - sudo dpkg --add-architecture i386 - sudo apt-get update - sudo apt-get install -y gcc-multilib lib32ncurses5-dev libx32ncurses5-dev uuid-dev:i386 libssl-dev:i386 - - name: Install libs for 64-bit - if: matrix.mach == 'a6le' || matrix.mach == 'ta6le' - run: | - sudo apt-get update - sudo apt-get install -y libncurses5-dev uuid-dev libssl-dev - - name: Build bootfiles - run: racket rktboot/main.rkt - - name: Build Chez - run: .github/scripts/build.sh - - name: Test Chez - run: .github/scripts/test.sh - - build-arm64: - runs-on: [self-hosted, ARM64, Linux] - container: - image: racket/racket-ci:latest - options: --init - - env: - MACH: tarm64le - - steps: - - name: Create Racket Temp Directory - run: mkdir /tmp/racket - - name: Build Racket CGC - working-directory: /tmp/racket - run: | - git clone --depth=1 https://github.com/racket/racket - cd racket/racket/src - ./configure --prefix=/usr --enable-cgcdefault --disable-docs --disable-cify - export cpus=$(nproc) - make -l $cpus -j $((cpus+1)) - make -j $((cpus+1)) install - cd - rm -Rf /tmp/racket - - name: Checkout ChezScheme - uses: actions/checkout@v2 - with: - submodules: 'recursive' - fetch-depth: 100 - - name: Build bootfiles - run: racket rktboot/main.rkt - - name: Build Chez - run: | - ./configure -m=$MACH - make -j$(($(nproc)+1)) -l$(nproc) - - name: Test Chez - run: .github/scripts/test.sh