From 66c7f514a26f8b60b4c3e3186f38546ba8061de5 Mon Sep 17 00:00:00 2001 From: Jose Beneyto Date: Sat, 14 Dec 2024 20:43:06 +0100 Subject: [PATCH] Add github workflow --- .github/workflows/toolchain-3.7.yaml | 124 +++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 .github/workflows/toolchain-3.7.yaml diff --git a/.github/workflows/toolchain-3.7.yaml b/.github/workflows/toolchain-3.7.yaml new file mode 100644 index 0000000..e212c7d --- /dev/null +++ b/.github/workflows/toolchain-3.7.yaml @@ -0,0 +1,124 @@ +name: toolchain-3.7 + +on: + push: + branches: + - '3.7' + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + name: Build 3.7 toolchain + runs-on: ubuntu-latest + + steps: + - name: Clone repo + uses: actions/checkout@v4 + + - name: Download source files + run: | + make download + + - name: Build linux-headers + uses: addnab/docker-run-action@v3 + with: + image: sepen/crux:3.7 + # Create a bind mount from the current workspace to /opt/arm-linux-gnueabihf + # github.workspace includes all of the code checked out from our current repo + # so anything done to this code will then be available to any following step + options: -v ${{ github.workspace }}:/opt/arm-linux-gnueabihf + run: | + make linux-headers -C /opt/arm-linux-gnueabihf + + - name: Build libgmp + uses: addnab/docker-run-action@v3 + with: + image: sepen/crux:3.7 + options: -v ${{ github.workspace }}:/opt/arm-linux-gnueabihf + run: | + make libgmp -C /opt/arm-linux-gnueabihf + + - name : Build libmpfr + uses: addnab/docker-run-action@v3 + with: + image: sepen/crux:3.7 + options: -v ${{ github.workspace }}:/opt/arm-linux-gnueabihf + run: | + make libmpfr -C /opt/arm-linux-gnueabihf + + - name : Build libmpc + uses: addnab/docker-run-action@v3 + with: + image: sepen/crux:3.7 + options: -v ${{ github.workspace }}:/opt/arm-linux-gnueabihf + run: | + make libmpc -C /opt/arm-linux-gnueabihf + + - name: Build binutils + uses: addnab/docker-run-action@v3 + with: + image: sepen/crux:3.7 + options: -v ${{ github.workspace }}:/opt/arm-linux-gnueabihf + run: | + make binutils -C /opt/arm-linux-gnueabihf + + - name: Build gcc-static + uses: addnab/docker-run-action@v3 + with: + image: sepen/crux:3.7 + options: -v ${{ github.workspace }}:/opt/arm-linux-gnueabihf + run: | + make gcc-static -C /opt/arm-linux-gnueabihf + + - name: Build make + uses: addnab/docker-run-action@v3 + with: + image: sepen/crux:3.7 + options: -v ${{ github.workspace }}:/opt/arm-linux-gnueabihf + run: | + make make -C /opt/arm-linux-gnueabihf + + - name: Build glibc + uses: addnab/docker-run-action@v3 + with: + image: sepen/crux:3.7 + options: -v ${{ github.workspace }}:/opt/arm-linux-gnueabihf + run: | + make glibc -C /opt/arm-linux-gnueabihf + + - name: Build gcc-final + uses: addnab/docker-run-action@v3 + with: + image: sepen/crux:3.7 + options: -v ${{ github.workspace }}:/opt/arm-linux-gnueabihf + run: | + make gcc-final -C /opt/arm-linux-gnueabihf + + - name: Test toolchain + uses: addnab/docker-run-action@v3 + with: + image: sepen/crux:3.7 + options: -v ${{ github.workspace }}:/opt/arm-linux-gnueabihf + run: | + make test -C /opt/arm-linux-gnueabihf + + - name: Release toolchain + uses: addnab/docker-run-action@v3 + with: + image: sepen/crux:3.7 + options: -v ${{ github.workspace }}:/opt/arm-linux-gnueabihf + run: | + mkdir /opt/arm-linux-gnueabihf/release + tar cvJf /opt/arm-linux-gnueabihf/release/crux-toolchain-arm-linux-gnueabihf-3.7-$(date +'%Y%m%d%H%M').tar.xz \ + /opt/arm-linux-gnueabihf/cross-sysroot /opt/arm-linux-gnueabihf/cross-tools + + - name: Upload toolchain + uses: burnett01/rsync-deployments@6.0.0 + with: + switches: -avz + path: release/ + remote_path: /home/frs/project/crux-arm/toolchain/ + remote_host: frs.sourceforge.net + remote_user: sepen + remote_key: ${{ secrets.SSH_PRIVATE_KEY }}