Skip to content

Commit

Permalink
CI -> Enable build flows.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbfm committed Dec 19, 2023
1 parent 8fd0f77 commit 9cca29c
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/actions/install-arm-gcc/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Install ARM GCC
description: Install ARM GCC

runs:
using: "composite"
steps:
- name: Install GCC for ARM
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y \
binutils-arm-linux-gnueabihf \
gcc-arm-linux-gnueabihf
39 changes: 39 additions & 0 deletions .github/workflows/build-carl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build-carl
on:
workflow_call: # allow this workflow to be called from other workflows
inputs:
runs-on:
default: "['ubuntu-latest']"
required: false
type: string

jobs:
build-carl:
strategy:
matrix:
package:
- name: opendut-carl
target:
name: linux-x86_64
triple: x86_64-unknown-linux-gnu
name: "Build ${{ matrix.package.name }}-${{ matrix.package.target.name }}"
runs-on: ${{ fromJson(inputs.runs-on) }}
steps:
- name: Checkout Sources
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Install ARM GCC
uses: ./.github/actions/install-arm-gcc
- name: Rust setup
uses: ./.github/actions/rust-setup
with:
cargo-cross: true

- name: Build
run: cargo ci opendut-carl build --target=${{ matrix.package.target.triple }}
- name: Upload Artifacts
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: "${{ matrix.package.name }}-${{ matrix.package.target.name }}-${{ github.sha }}"
path: "./target/ci/cross/${{ matrix.package.target.triple }}/release/${{ matrix.package.name }}"
if-no-files-found: error
retention-days: 1
47 changes: 47 additions & 0 deletions .github/workflows/build-edgar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: build-edgar
on:
workflow_call: # allow this workflow to be called from other workflows
inputs:
runs-on:
default: "['ubuntu-latest']"
required: false
type: string

jobs:
build-edgar:
strategy:
matrix:
package:
- name: opendut-edgar
target:
name: linux-x86_64
triple: x86_64-unknown-linux-gnu
- name: opendut-edgar
target:
name: linux-armhf
triple: armv7-unknown-linux-gnueabihf
- name: opendut-edgar
target:
name: linux-arm64
triple: aarch64-unknown-linux-gnu
name: "Build ${{ matrix.package.name }}-${{ matrix.package.target.name }}"
runs-on: ${{ fromJson(inputs.runs-on) }}
steps:
- name: Checkout Sources
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Install ARM GCC
uses: ./.github/actions/install-arm-gcc
- name: Rust setup
uses: ./.github/actions/rust-setup
with:
cargo-cross: true

- name: Build
run: cargo ci opendut-edgar build --target=${{ matrix.package.target.triple }}
- name: "Upload EDGAR build artifact ${{ matrix.package.name }}-${{ matrix.package.target.name }}"
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: "${{ matrix.package.name }}-${{ matrix.package.target.name }}-${{ github.sha }}"
path: "./target/ci/cross/${{ matrix.package.target.triple }}/release/${{ matrix.package.name }}"
if-no-files-found: error
retention-days: 1
31 changes: 31 additions & 0 deletions .github/workflows/build-lea.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build-lea
on:
workflow_call: # allow this workflow to be called from other workflows
inputs:
runs-on:
default: "['ubuntu-latest']"
required: false
type: string

jobs:
build-lea:
name: "Build opendut-lea"
runs-on: ${{ fromJson(inputs.runs-on) }}
steps:
- name: Checkout Sources
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Rust setup
uses: ./.github/actions/rust-setup
with:
cargo-cross: true
cargo-trunk: true

- name: Build
run: cargo ci opendut-lea build
- name: "Upload LEA build artifact"
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: "opendut-lea-${{ github.sha }}"
path: "./opendut-lea/dist"
if-no-files-found: error
retention-days: 1
18 changes: 18 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,22 @@ jobs:
test:
uses: ./.github/workflows/test.yaml
# with:
# runs-on: "${{ vars.OPENDUT_GH_RUNNER_LARGE }}"

build-carl:
uses: ./.github/workflows/build-carl.yaml
needs: [ test ]
# with:
# runs-on: "${{ vars.OPENDUT_GH_RUNNER_LARGE }}"

build-edgar:
uses: ./.github/workflows/build-edgar.yaml
needs: [ test ]
# with:
# runs-on: "${{ vars.OPENDUT_GH_RUNNER_LARGE }}"

build-lea:
uses: ./.github/workflows/build-lea.yaml
needs: [ test ]
# with:
# runs-on: "${{ vars.OPENDUT_GH_RUNNER_LARGE }}"

0 comments on commit 9cca29c

Please sign in to comment.