-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a clean pull which provides the SHA and SHA7 of the current branch Added a build target for any platform or targets
- Loading branch information
1 parent
f6e107f
commit cb645a7
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Build Platform and Archive | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
platform: | ||
required: true | ||
type: string | ||
flags: | ||
default: "-j32" | ||
type: string | ||
build-type: | ||
required: true | ||
options: | ||
- platform | ||
- targets | ||
outputs: | ||
build-artifacts-link: | ||
description: "The link to the github archive of the build artifacts" | ||
value: ${{ jobs.run.outputs.archive-url }} | ||
sha: | ||
description: "The current branch's SHA" | ||
value: ${{ jobs.run.outputs.sha }} | ||
short-sha: | ||
description: "The current branch's short (7) SHA" | ||
value: ${{ jobs.run.outputs.short-sha }} | ||
|
||
jobs: | ||
run: | ||
runs-on: self-hosted | ||
container: | ||
image: docker://ghcr.io/concordia-fsae/containers/ubuntu-noble-lts:v1.0.0 | ||
outputs: | ||
archive-url: ${{ steps.archive.outputs.archive-url }} | ||
sha: ${{ steps.pull.outputs.sha }} | ||
short-sha: ${{ steps.pull.outputs.short-sha }} | ||
steps: | ||
- name: Get Clean Branch | ||
id: pull | ||
uses: concordia-fsae/firmware/.github/workflows/reusable/clean_pull.yml@main | ||
- name: Build Platform ${{ inputs.platform }} | ||
id: build | ||
run: | | ||
scons --${{ inputs.build-type }}=${{ inputs.platform }} ${{ inputs.flags }} | ||
- name: Archive Artifacts | ||
id: archive | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifacts | ||
path: platform-artifacts/ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Clean Working dir, Pull Current Branch, and Retrive Branch Metadata | ||
|
||
on: | ||
workflow_dispatch: | ||
outputs: | ||
sha: | ||
description: "The current branch's SHA" | ||
value: ${{ jobs.run.outputs.sha }} | ||
short-sha: | ||
description: "The current branch's short (7) SHA" | ||
value: ${{ jobs.run.outputs.short-sha }} | ||
|
||
jobs: | ||
run: | ||
outputs: | ||
sha: ${{ steps.sha.outputs.sha }} | ||
short-sha: ${{ steps.sha.outputs.short-sha }} | ||
steps: | ||
- name: Clean | ||
uses: AutoModality/action-clean@1077775f5ef0022fc3a9d6f93377921ea3701fa7 | ||
- name: Pull Branch | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
show-progress: 'true' | ||
submodules: 'recursive' | ||
- name: Get SHA and SHA7 | ||
id: sha | ||
run: | | ||
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT && \ | ||
echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT |