forked from k0gen/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
60 lines (53 loc) · 1.68 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: 'StartOS SDK'
description: 'Provides start-sdk and start-cli'
runs:
using: 'composite'
steps:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update
sudo apt-get install -y git build-essential openssl libssl-dev libc6-dev clang libclang-dev ca-certificates curl
sudo snap install yq deno
cargo install --force toml-cli web-static-pack-packer
cargo install --git=https://github.com/Start9Labs/md-packer.git --branch=main
shell: bash
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout start-os
uses: actions/checkout@v4
with:
repository: Start9Labs/start-os
ref: sdk
submodules: recursive
- name: Cache start-sdk
uses: actions/cache@v4
id: cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-start-sdk-${{ hashFiles('**/install-sdk.sh') }}
- name: Install start-sdk
run: |
if [ -z "$(command -v start-sdk)" ]; then
export RUSTFLAGS=""
export OS_ARCH=$(uname -m)
cargo update -p time --manifest-path=core/Cargo.toml
make sdk
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
fi
shell: bash