Skip to content

Commit

Permalink
archutil: bake target and workflow for exits bins
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Feb 9, 2024
1 parent 4a12794 commit 7becc39
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/archutil.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: archutil

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
workflow_dispatch:
push:
branches:
- 'master'
- 'v[0-9]+.[0-9]+'
pull_request:

env:
SETUP_BUILDX_VERSION: "latest"
SETUP_BUILDKIT_IMAGE: "moby/buildkit:latest"
DESTDIR: "./bin"

jobs:
exits:
runs-on: ubuntu-22.04
steps:
-
name: Prepare
run: |
sudo apt-get update
sudo apt-get install -y cpuid
-
name: Checkout
uses: actions/checkout@v4
-
name: Show cpuinfo
run: |
cat /proc/cpuinfo
-
name: Show cpuid
run: |
cpuid
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: ${{ env.SETUP_BUILDX_VERSION }}
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
buildkitd-flags: --debug
-
name: Generate exits
uses: docker/bake-action@v4
with:
targets: archutil-exits
provenance: false
-
name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: archutil-exits
path: ${{ env.DESTDIR }}/*
if-no-files-found: error
7 changes: 7 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ target "archutil" {
output = ["./util/archutil"]
}

target "archutil-exits" {
inherits = ["_common"]
dockerfile = "./hack/dockerfiles/archutil.Dockerfile"
target = "exits"
output = [bindir("archutil")]
}

target "shfmt" {
inherits = ["_common"]
dockerfile = "./hack/dockerfiles/shfmt.Dockerfile"
Expand Down

0 comments on commit 7becc39

Please sign in to comment.