Build oyster-nitro-kernels #17
This file contains 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: Build oyster-nitro-kernels | |
on: | |
workflow_dispatch: | |
inputs: | |
oyster-nitro-kernels-version: | |
description: 'oyster-nitro-kernels version' | |
# required: false | |
default: 'vX.Y.Z-beta.U' | |
oyster-nitro-kernels-channel: | |
description: 'oyster-nitro-kernels channel' | |
# required: false | |
default: 'vanilla' | |
jobs: | |
build_linux: | |
name: Build oyster-nitro-kernels linux | |
strategy: | |
matrix: | |
include: | |
- os: 'ubuntu-24.04' | |
runs-on: 'ubicloud' | |
build_type: Release | |
GOOS: linux | |
GOARCH: amd64 | |
KNAME: bzImage | |
KARCH: x86_64 | |
- os: 'ubuntu-24.04' | |
runs-on: 'ubicloud-standard-2-arm' | |
build_type: Release | |
GOOS: linux | |
GOARCH: arm64 | |
KNAME: Image | |
KARCH: aarch64 | |
runs-on: ${{ matrix.runs-on }} | |
outputs: | |
oyster-nitro-kernels-checksum: ${{steps.oyster-nitro-kernels.outputs.checksum}} | |
steps: | |
- name: echo | |
run: | | |
echo oyster-nitro-kernels-version ${{github.event.inputs.oyster-nitro-kernels-version}} | |
echo oyster-nitro-kernels-channel ${{github.event.inputs.oyster-nitro-kernels-channel}} | |
- name: clone | |
run: rm -rf oyster-nitro-kernels && git clone https://github.com/marlinprotocol/oyster-nitro-kernels | |
- name: checkout | |
run: cd oyster-nitro-kernels && git checkout ${{github.event.inputs.oyster-nitro-kernels-version}} | |
- name: nix | |
run: sudo install -d -m755 -o $(id -u) -g $(id -g) /nix && curl -L https://nixos.org/nix/install | sh | |
- name: build | |
run: cd oyster-nitro-kernels && . /home/runner/.nix-profile/etc/profile.d/nix.sh && nix-build -A all -v | |
- name: upload oyster-nitro-kernels | |
id: oyster-nitro-kernels | |
if: ${{github.event.inputs.oyster-nitro-kernels-version != 'vX.Y.Z-beta.U'}} | |
run: | | |
AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} aws s3 cp --endpoint-url ${{secrets.AWS_S3_ENDPOINT}} oyster-nitro-kernels/result/${{matrix.KARCH}}/${{matrix.KNAME}} s3://artifacts/oyster/kernels/${{github.event.inputs.oyster-nitro-kernels-channel}}_${{github.event.inputs.oyster-nitro-kernels-version}}_${{matrix.GOARCH}}/${{matrix.KNAME}} | |
AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} aws s3 cp --endpoint-url ${{secrets.AWS_S3_ENDPOINT}} oyster-nitro-kernels/result/${{matrix.KARCH}}/${{matrix.KNAME}}.config s3://artifacts/oyster/kernels/${{github.event.inputs.oyster-nitro-kernels-channel}}_${{github.event.inputs.oyster-nitro-kernels-version}}_${{matrix.GOARCH}}/${{matrix.KNAME}}.config | |
AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} aws s3 cp --endpoint-url ${{secrets.AWS_S3_ENDPOINT}} oyster-nitro-kernels/result/${{matrix.KARCH}}/init s3://artifacts/oyster/kernels/${{github.event.inputs.oyster-nitro-kernels-channel}}_${{github.event.inputs.oyster-nitro-kernels-version}}_${{matrix.GOARCH}}/init | |
AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} aws s3 cp --endpoint-url ${{secrets.AWS_S3_ENDPOINT}} oyster-nitro-kernels/result/${{matrix.KARCH}}/linuxkit s3://artifacts/oyster/kernels/${{github.event.inputs.oyster-nitro-kernels-channel}}_${{github.event.inputs.oyster-nitro-kernels-version}}_${{matrix.GOARCH}}/linuxkit | |
AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} aws s3 cp --endpoint-url ${{secrets.AWS_S3_ENDPOINT}} oyster-nitro-kernels/result/${{matrix.KARCH}}/nsm.ko s3://artifacts/oyster/kernels/${{github.event.inputs.oyster-nitro-kernels-channel}}_${{github.event.inputs.oyster-nitro-kernels-version}}_${{matrix.GOARCH}}/nsm.ko |