|
| 1 | +# This is a basic workflow to help you get started with Actions |
| 2 | + |
| 3 | +name: CI |
| 4 | + |
| 5 | +# Controls when the workflow will run |
| 6 | +on: |
| 7 | + # Triggers the workflow on push or pull request events but only for the $default-branch branch |
| 8 | + push: |
| 9 | + branches: [ eic770x-master ] |
| 10 | + pull_request: |
| 11 | + branches: [ eic770x-master ] |
| 12 | + |
| 13 | + # Allows you to run this workflow manually from the Actions tab |
| 14 | + workflow_dispatch: |
| 15 | + |
| 16 | +# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 17 | +jobs: |
| 18 | + # This workflow contains a single job called "build" |
| 19 | + build: |
| 20 | + # The type of runner that the job will run on |
| 21 | + runs-on: self-hosted |
| 22 | + env: |
| 23 | + http_proxy: "http://10.10.3.72:7890" |
| 24 | + https_proxy: "http://10.10.3.72:7890" |
| 25 | + # Steps represent a sequence of tasks that will be executed as part of the job |
| 26 | + steps: |
| 27 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 28 | + - name: Checkout eic770x-master |
| 29 | + uses: actions/checkout@v4 |
| 30 | + with: |
| 31 | + ref: eic770x-master |
| 32 | + path: eic770x-linux |
| 33 | + # Runs a set of commands using the runners shell |
| 34 | + - name: build-linux |
| 35 | + id: build-linux |
| 36 | + run: | |
| 37 | + sudo docker ps |
| 38 | + pwd |
| 39 | + sudo docker run --rm --name build-linux-$GITHUB_RUN_ID \ |
| 40 | + --privileged=true -v /home/gitlab-runner/actions-runner/_work/DC-linux/DC-linux/eic770x-linux:/home/workspace \ |
| 41 | + -u root -w "/home/workspace"\ |
| 42 | + es_debian \ |
| 43 | + /bin/bash -c " |
| 44 | + cd /home/workspace |
| 45 | + export PATH="/opt/riscv/bin:$PATH" |
| 46 | + export ARCH=riscv |
| 47 | + export CROSS_COMPILE=riscv64-unknown-linux-gnu- |
| 48 | + make eic7702_defconfig |
| 49 | + make -j$(nproc) |
| 50 | + DEB_BUILD_PROFILES=pkg.linux-upstream.nokernelheaders make -j$(nproc) bindeb-pkg |
| 51 | + make modules_install INSTALL_MOD_PATH=/home/workspace |
| 52 | + mv ../*.deb . |
| 53 | + " |
| 54 | + - name: send-mail |
| 55 | + if: ${{ failure() && steps.build-linux.conclusion == 'failure' }} |
| 56 | + # if: ${{ success() && steps.build-linux.conclusion == 'success' }} |
| 57 | + env: |
| 58 | + mail: ${{ secrets.SEND_MAIL }} |
| 59 | + run: | |
| 60 | + echo $mail |
| 61 | + echo "CI build code failure ! $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/$JOB_ID" | mail -s "build code" $mail |
| 62 | + |
| 63 | + - name: upload |
| 64 | + env: |
| 65 | + passd: ${{ secrets.SEND_MAIL }} |
| 66 | + run: | |
| 67 | + pwd |
| 68 | + cd /home/gitlab-runner/actions-runner/_work/DC-linux/DC-linux/eic770x-linux/lib |
| 69 | + #sudo rm -rf eic770x-linux |
| 70 | + zip -r -y modules.zip modules |
| 71 | + curl -uadmin:${{secrets.ADMIN_PASS}} -T modules.zip ${{secrets.JFROG_PATH}}/eic770x-linux/modules.zip |
| 72 | + cd /home/gitlab-runner/actions-runner/_work/DC-linux/DC-linux/eic770x-linux/arch/riscv |
| 73 | + zip -r -y boot.zip boot |
| 74 | + curl -uadmin:${{secrets.ADMIN_PASS}} -T boot.zip ${{secrets.JFROG_PATH}}/eic770x-linux/boot.zip |
| 75 | + cd /home/gitlab-runner/actions-runner/_work/DC-linux/DC-linux/eic770x-linux/ |
| 76 | + curl -uadmin:${{secrets.ADMIN_PASS}} -T linux-image-*riscv64.deb ${{secrets.JFROG_PATH}}/eic770x-linu/linux-image-riscv64.deb |
| 77 | + curl -uadmin:${{secrets.ADMIN_PASS}} -T linux-libc-*riscv64.deb ${{secrets.JFROG_PATH}}/eic770x-linu/linux-libc-riscv64.deb |
| 78 | + cd ../ |
| 79 | + sudo rm -rf /home/gitlab-runner/actions-runner/_work/DC-linux/DC-linux/eic770x-linux/ |
| 80 | +
|
| 81 | +
|
0 commit comments