Skip to content

Commit

Permalink
GH workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Koch <[email protected]>
  • Loading branch information
hugelgupf committed Feb 28, 2024
1 parent c71dc91 commit 139b433
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 25 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ on:
pull_request:
branches: [ "main" ]

# Cancel running workflows on new push to a PR.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
template: [core, all, embedded, minimal]
template: ["core", "boot core", "world"]
arch: [amd64, arm, arm64, riscv64]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: u-root/u-root

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Build
run: |
go build .
GOARCH=${{ matrix.arch }} ./u-root -uroot-source . \
-o u-root-${{ matrix.arch }}-${{ matrix.template }}.cpio \
${{ matrix.template }}
- name: Build
run: |
go install github.com/u-root/mkuimage/cmd/mkuimage@latest
GOARCH=${{ matrix.arch }} mkuimage -config=default \
${{ matrix.template }}
13 changes: 5 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,22 @@ jobs:
publish:
strategy:
matrix:
template: [core, all, embedded, minimal]
template: ["core", "boot core", "world"]
arch: [amd64, arm, arm64, riscv64]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
repository: u-root/u-root

- name: Set up Go
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Build
run: |
go build .
GOARCH=${{ matrix.arch }} ./u-root -uroot-source . \
go install github.com/u-root/mkuimage/cmd/mkuimage@latest
GOARCH=${{ matrix.arch }} mkuimage -config=default \
-o ${{ matrix.arch }}-${{ matrix.template }}.cpio \
${{ matrix.template }}
xz --check=crc32 -9 --lzma2=dict=1MiB \
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/u-root/u-root-distro

go 1.22
go 1.21

require (
github.com/dustin/go-humanize v1.0.1 // indirect
Expand Down

0 comments on commit 139b433

Please sign in to comment.