Build oyster-nitro-kernels #2
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 | |
- os: 'ubuntu-24.04' | |
runs-on: 'ubicloud-standard-2-arm' | |
build_type: Release | |
GOOS: linux | |
GOARCH: arm64 | |
KNAME: Image | |
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}} | |
- uses: cachix/install-nix-action@v27 | |
with: | |
nix_path: nixpkgs=channel:nixos-23.11 | |
- name: build | |
run: cd oyster-nitro-kernels && 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.GOARCH}}/${{matrix.KNAME}} s3://artifacts/oyster/kernels/vanilla_${{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.GOARCH}}/${{matrix.KNAME}}.config s3://artifacts/oyster/kernels/vanilla_${{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.GOARCH}}/init s3://artifacts/oyster/kernels/vanilla_${{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.GOARCH}}/linuxkit s3://artifacts/oyster/kernels/vanilla_${{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.GOARCH}}/nsm.ko s3://artifacts/oyster/kernels/vanilla_${{github.event.inputs.oyster-nitro-kernels-version}}_${{matrix.GOARCH}}/nsm.ko |