Skip to content

Use --transform option for tar in CI action #55

Use --transform option for tar in CI action

Use --transform option for tar in CI action #55

name: brickOS-bibo CI
on:
workflow_dispatch:
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
- name: Execute the build
run: make
- name: Test-run a host installation
run: make DESTDIR=$(pwd)/build/destdir 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
- name: Tar the host installation snapshot to preserve file permissions
run: tar --verbose --create --file build/install.tar --transform='s,build/destdir/,,' build/destdir/
- name: Archive the host installation snapshot tar file
uses: actions/upload-artifact@v4
with:
name: brickOS-bibo_install_[runner~${{ matrix.os }}]
path: build/install.tar
- name: Archive the firmware image
uses: actions/upload-artifact@v4
with:
name: brickOS-bibo_firmware_[runner~${{ matrix.os }}]
path: |
kernel/*.srec
kernel/*.coff
- name: Archive the demo program files
uses: actions/upload-artifact@v4
with:
name: brickOS-bibo_programs_[runner~${{ matrix.os }}]
path: |
demo/**/*.lx
demo/**/*.a