Skip to content

Commit 2f5bbcd

Browse files
committed
update gh workflows to use just instead of cargo-make
1 parent 87cd735 commit 2f5bbcd

7 files changed

Lines changed: 122 additions & 152 deletions

File tree

.github/dependabot.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10

.github/dependabot.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/shared/qemu/action.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "QEMU"
2+
description: "Install QEMU for particular platform"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Install QEMU (Linux)
7+
if: runner.os == 'Linux'
8+
run: |
9+
sudo apt-get update
10+
sudo apt-get install --fix-missing qemu-system-aarch64
11+
12+
- name: Install QEMU (macOS)
13+
if: runner.os == 'macOS'
14+
run: brew install qemu
15+
env:
16+
HOMEBREW_NO_AUTO_UPDATE: 1
17+
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1
18+
HOMEBREW_NO_INSTALL_CLEANUP: 1
19+
20+
- name: Install Scoop (Windows)
21+
if: runner.os == 'Windows'
22+
shell: pwsh
23+
run: |
24+
Invoke-WebRequest -UseBasicParsing get.scoop.sh -outfile 'install.ps1'
25+
.\install.ps1 -RunAsAdmin
26+
echo "$HOME\scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
27+
28+
- name: Add custom Scoop bucket for QEMU (Windows)
29+
if: runner.os == 'Windows'
30+
shell: pwsh
31+
run: |
32+
scoop bucket add scoop-for-ci https://github.com/metta-systems/scoop-for-ci
33+
34+
- name: Install QEMU (Windows)
35+
if: runner.os == 'Windows'
36+
shell: pwsh
37+
run: scoop install qemu-1010
38+
39+
- name: "Print QEMU Version"
40+
run: qemu-system-aarch64 --version

.github/shared/setup/action.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Prepare"
2+
description: "Prepare Rust build environment and dependencies"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: "Install nightly Rust"
7+
uses: actions-rust-lang/setup-rust-toolchain@v1
8+
with:
9+
rustflags: ""
10+
- name: "Install Just"
11+
uses: "taiki-e/install-action@just"
12+
- name: "Print Rust Version"
13+
run: |
14+
rustc -Vv
15+
cargo -Vv
16+
- name: "Install build tools"
17+
run: cargo install cargo-binutils
18+
- name: "Validate rust-lld"
19+
if: runner.os == 'macOS'
20+
run: |
21+
which rust-lld || echo "Not found"
22+
otool -L ~/.cargo/bin/rust-lld
23+
- name: "Print Tools Versions"
24+
run: |
25+
just --version
26+
cargo objcopy --version

.github/workflows/build.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
pull_request:
8+
9+
jobs:
10+
check_formatting:
11+
name: "Check Formatting"
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 2
14+
steps:
15+
- name: "Checkout Repository"
16+
uses: actions/checkout@v6
17+
- uses: "./.github/shared/setup"
18+
- run: just fmt-check
19+
20+
clippy:
21+
name: "Clippy"
22+
needs: check_formatting
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 10
25+
steps:
26+
- name: "Checkout Repository"
27+
uses: actions/checkout@v6
28+
- uses: "./.github/shared/setup"
29+
- run: just clippy
30+
31+
test:
32+
name: Test
33+
needs: check_formatting
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
platform: [ubuntu-latest, macos-latest, windows-latest]
38+
runs-on: ${{ matrix.platform }}
39+
timeout-minutes: 30
40+
steps:
41+
- name: "Checkout Repository"
42+
uses: actions/checkout@v6
43+
- uses: "./.github/shared/setup"
44+
- uses: "./.github/shared/qemu"
45+
- name: "Build kernel"
46+
run: just build
47+
- name: "Run tests"
48+
run: just test

.github/workflows/build.yml

Lines changed: 0 additions & 130 deletions
This file was deleted.

Justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ clean:
308308
# Check formatting
309309
[group("maintenance")]
310310
fmt-check:
311-
cargo fmt -- --check
311+
cargo +nightly fmt -- --check
312312

313313
# Run lint tasks
314314
[group("maintenance")]

0 commit comments

Comments
 (0)