CI #1565
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the | |
| # master branch. | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Triggers the workflow every day at 23:00. | |
| schedule: | |
| - cron: '0 23 * * *' | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # A workflow run is made up of one or more jobs that can run sequentially or in | |
| # parallel. | |
| jobs: | |
| # This workflow contains a single job called "build" | |
| build: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-latest | |
| # Environment variables | |
| env: | |
| # Setup $GOPATH | |
| GOPATH: ${{ github.workspace }}/go | |
| # Run the build for each one of these configurations in parallel. | |
| strategy: | |
| matrix: | |
| # The `${{ matrix.mainboard }}` variable is replaced with each of these. | |
| mainboard: | |
| # '-' is used instead of '/' due to restrictions on artifact upload. | |
| - ampere-jade | |
| - aeeon-up | |
| - qemu-x86_64 | |
| # Do not cancel all jobs steps if a single one fails. | |
| fail-fast: false | |
| # Steps represent a sequence of tasks that will be executed as part of the | |
| # job. | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can | |
| # access it. | |
| - uses: actions/checkout@v4 | |
| # We need this newer version of Go. | |
| - name: Go version | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Install dependent packages | |
| run: | | |
| set -ex | |
| sudo apt-get update | |
| sudo apt-get install gcc-aarch64-linux-gnu gcc-arm-linux-gnueabi{,hf} gcc-riscv64-linux-gnu libelf-dev u-boot-tools | |
| # Runs a set of commands using the runners shell | |
| - name: Make ${{ matrix.mainboard }} kernel | |
| run: | | |
| set -ex | |
| go version | |
| cd mainboards | |
| PATH=$GOPATH/bin:/usr/local/go/bin:$PATH | |
| cd $(echo ${{ matrix.mainboard }} | tr '-' '/') | |
| make fetch | |
| make flashkernel | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.mainboard }} | |
| path: | | |
| **/flashkernel | |
| **/flashinitramfs.cpio | |
| retention-days: 30 |