forked from lxc/incus
-
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.
Currently the workflows repeat steps unnecessarily. Compute and power may be cheap but it's not free.
- Loading branch information
1 parent
411dc2a
commit 271c949
Showing
2 changed files
with
101 additions
and
1 deletion.
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,100 @@ | ||
name: Build | ||
on: | ||
push: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
shellcheck: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Differential ShellCheck | ||
id: ShellCheck | ||
uses: redhat-plumbers-in-action/differential-shellcheck@v5 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload artifact with ShellCheck defects in SARIF format | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Differential ShellCheck SARIF | ||
path: ${{ steps.ShellCheck.outputs.sarif }} | ||
|
||
build: | ||
strategy: | ||
matrix: | ||
go: | ||
- oldstable | ||
- stable | ||
- tip | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Install Dependencies | ||
run: | | ||
sudo add-apt-repository ppa:cowsql/stable -y --no-update | ||
sudo apt-get update | ||
sudo apt-get install --no-install-recommends -y \ | ||
autoconf \ | ||
automake \ | ||
libcowsql-dev \ | ||
libacl1-dev \ | ||
libcap-dev \ | ||
liblxc1 \ | ||
liblz4-dev \ | ||
libsqlite3-dev \ | ||
libudev-dev \ | ||
libuv1-dev \ | ||
lxc-dev \ | ||
make \ | ||
pkg-config | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go (${{ matrix.go }}) | ||
if: matrix.go != 'tip' | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Install Go (tip) | ||
if: matrix.go == 'tip' | ||
run: | | ||
go install golang.org/dl/gotip@latest | ||
gotip download | ||
~/sdk/gotip/bin/go version | ||
echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV | ||
- name: Save Go env | ||
id: go-env | ||
run: go env >> $GITHUB_OUTPUT | ||
|
||
- name: Check compatible min Go version | ||
run: | | ||
go mod tidy | ||
- name: Download go dependencies | ||
run: | | ||
go mod download | ||
- name: Run Incus build | ||
run: | | ||
make | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: incus | ||
path: | | ||
./ | ||
${{ steps.go-env.GOPATH }}/ |
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