chore: Add conventional commits check workflow #146
Workflow file for this run
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 | |
on: [push] | |
env: | |
TOOLCHAIN_IMAGE: ghcr.io/${{ github.repository_owner }}/toolchain | |
TOOLCHAIN_TAG: feature-bump-gcc | |
jobs: | |
tools: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Login to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Export makefile variables | |
run: make env >> $GITHUB_ENV | |
- name: Download and check dependencies | |
run: make checksum | |
- name: Buildx setup | |
uses: docker/setup-buildx-action@v2 | |
- name: Docker meta | |
id: docker_meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ secrets.DOCKER_ORGANIZATION }}/machine-emulator-tools | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
- name: Build [${{ env.MACHINE_EMULATOR_TOOLS_TAR_GZ }}] | |
id: docker_build | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
builder: ${{ steps.buildx.outputs.name }} | |
tags: ${{ steps.docker_meta.outputs.tags }} | |
push: false | |
load: true | |
build-args: | | |
MACHINE_EMULATOR_TOOLS_TAR_GZ=${{ env.MACHINE_EMULATOR_TOOLS_TAR_GZ }} | |
MACHINE_EMULATOR_TOOLS_DEB=${{ env.MACHINE_EMULATOR_TOOLS_DEB }} | |
MACHINE_EMULATOR_TOOLS_VERSION=${{ env.MACHINE_EMULATOR_TOOLS_VERSION }} | |
LINUX_SOURCES_VERSION=${{ env.LINUX_SOURCES_VERSION }} | |
LINUX_SOURCES_FILEPATH=${{ env.LINUX_SOURCES_FILEPATH }} | |
RNDADDENTROPY_VERSION=${{ env.RNDADDENTROPY_VERSION }} | |
RNDADDENTROPY_FILEPATH=${{ env.RNDADDENTROPY_FILEPATH }} | |
cache-from: type=gha,scope=regular,mode=max | |
cache-to: type=gha,scope=regular | |
- name: Retrieve artifacts | |
run: make copy MACHINE_EMULATOR_TOOLS_IMAGE=`echo "${{ steps.docker_meta.outputs.tags }}" | head -1 | cut -d "," -f 1 | xargs` | |
- name: Upload [${{ env.MACHINE_EMULATOR_TOOLS_TAR_GZ }}] | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.MACHINE_EMULATOR_TOOLS_TAR_GZ }} | |
path: ${{ env.MACHINE_EMULATOR_TOOLS_TAR_GZ }} | |
- name: Upload [${{ env.MACHINE_EMULATOR_TOOLS_DEB }}] | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.MACHINE_EMULATOR_TOOLS_DEB }} | |
path: ${{ env.MACHINE_EMULATOR_TOOLS_DEB }} | |
- name: Checksum artifacts | |
run: | | |
sha512sum ${{ env.MACHINE_EMULATOR_TOOLS_DEB }} > ${{ env.MACHINE_EMULATOR_TOOLS_DEB }}.sha512 | |
sha512sum ${{ env.MACHINE_EMULATOR_TOOLS_TAR_GZ }} > ${{ env.MACHINE_EMULATOR_TOOLS_TAR_GZ }}.sha512 | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
prerelease: true | |
files: | | |
${{ env.MACHINE_EMULATOR_TOOLS_TAR_GZ }} | |
${{ env.MACHINE_EMULATOR_TOOLS_TAR_GZ }}.sha512 | |
${{ env.MACHINE_EMULATOR_TOOLS_DEB }} | |
${{ env.MACHINE_EMULATOR_TOOLS_DEB }}.sha512 | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Login to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build yield tool | |
run: cd linux/htif && make toolchain-exec CONTAINER_COMMAND="/usr/bin/make yield.toolchain" | |
- name: Build ioctl-echo-loop tool | |
run: cd linux/rollup/ioctl-echo-loop && make toolchain-exec CONTAINER_COMMAND="/usr/bin/make ioctl-echo-loop.toolchain" | |
- name: Build rollup tool | |
run: cd linux/rollup/rollup && make toolchain-exec CONTAINER_COMMAND="/usr/bin/make rollup.toolchain" | |
- name: Build rollup http server | |
run: cd linux/rollup/http/rollup-http-server && ./build.sh | |
- name: Build echo dapp | |
run: cd linux/rollup/http/echo-dapp && ./build.sh | |
- name: Test rollup-http-server and echo-dapp client | |
run: | | |
cd linux/rollup/http/rollup-http-server | |
USE_ROLLUP_BINDINGS_MOCK=1 cargo test -- --show-output --test-threads=1 |