-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:AntelopeIO/leap into gh-17
- Loading branch information
Showing
76 changed files
with
1,741 additions
and
810 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
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
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
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,87 @@ | ||
name: "Build leap" | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
outputs: | ||
p: | ||
description: "Discovered Build Platforms" | ||
value: ${{ jobs.d.outputs.p }} | ||
|
||
permissions: | ||
packages: read | ||
contents: read | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
d: | ||
name: Discover Platforms | ||
runs-on: ubuntu-latest | ||
outputs: | ||
missing-platforms: ${{steps.discover.outputs.missing-platforms}} | ||
p: ${{steps.discover.outputs.platforms}} | ||
steps: | ||
- name: Discover Platforms | ||
id: discover | ||
uses: AntelopeIO/discover-platforms-action@v1 | ||
with: | ||
platform-file: .cicd/platforms.json | ||
password: ${{secrets.GITHUB_TOKEN}} | ||
package-name: builders | ||
|
||
build-platforms: | ||
name: Build Platforms | ||
needs: d | ||
if: needs.d.outputs.missing-platforms != '[]' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: ${{fromJSON(needs.d.outputs.missing-platforms)}} | ||
runs-on: ["self-hosted", "enf-x86-beefy"] | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- name: Login to Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{github.repository_owner}} | ||
password: ${{secrets.GITHUB_TOKEN}} | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} | ||
file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}} | ||
|
||
Build: | ||
name: Build leap | ||
needs: [d, build-platforms] | ||
if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ubuntu20, ubuntu22] | ||
runs-on: ["self-hosted", "enf-x86-beefy"] | ||
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Build | ||
id: build | ||
run: | | ||
# https://github.com/actions/runner/issues/2033 | ||
chown -R $(id -u):$(id -g) $PWD | ||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_LEAP_DEV_DEB=On -GNinja | ||
cmake --build build | ||
tar -pc --exclude "*.o" build | zstd --long -T0 -9 > build.tar.zst | ||
- name: Upload builddir | ||
uses: AntelopeIO/upload-artifact-large-chunks-action@v1 | ||
with: | ||
name: ${{matrix.platform}}-build | ||
path: build.tar.zst |
Oops, something went wrong.