brickOS-bibo CI #204
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: brickOS-bibo CI | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # Following POSIX cron syntax, run every Monday morning at 5:30 AM UTC | |
| # https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07 | |
| - cron: '30 5 * * 1' | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| steps: | |
| - name: Get latest from version control | |
| uses: actions/checkout@v4 | |
| - name: Update build environment | |
| run: sudo apt-get --assume-yes update | |
| - name: Install build dependencies | |
| run: sudo apt-get --assume-yes install binutils-h8300-hms gcc-h8300-hms stow | |
| - name: Execute the build | |
| run: make | |
| - name: Test install the new build to a sysroot | |
| run: make DESTDIR=$(pwd)/sysroot prefix=/ install | |
| # Before archiving, tar the host installation output to preserve file permission | |
| # c.f. https://github.com/actions/upload-artifact?tab=readme-ov-file#permission-loss | |
| # To avoid including a "." or other unwanted directory, c.f. https://stackoverflow.com/a/39530409 | |
| - name: Tar the host installation snapshot to preserve file permissions | |
| run: find sysroot/ -printf "%P\n" | tar --verbose --create --file install.tar --no-recursion --directory=sysroot/ --files-from=- | |
| - name: Archive the host installation snapshot tar file | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: brickOS-bibo_install_[runner~${{ matrix.os }}]_run${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }} | |
| path: install.tar | |
| - name: Prepare the firmware and program images for archiving | |
| run: cp --preserve kernel/*.srec kernel/*.coff demo/ | |
| - name: Archive the firmware image | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: brickOS-bibo_firmware_[runner~${{ matrix.os }}]_run${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }} | |
| path: | | |
| kernel/*.srec | |
| kernel/*.coff | |
| - name: Archive the demo program files | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: brickOS-bibo_firmware+programs_[runner~${{ matrix.os }}]_run${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }} | |
| path: | | |
| demo/**/*.srec | |
| demo/**/*.coff | |
| demo/**/*.lx | |
| demo/**/*.a | |
| - name: Install the new build using Stow | |
| run: sudo make stow |