Compare commits
12 Commits
Author | SHA1 | Date |
---|---|---|
|
6b80fef93b | |
|
446dc68b6e | |
|
9367e66aac | |
|
94a13981bd | |
|
d2d6e2082c | |
|
18973418cc | |
|
a420c08f04 | |
|
234d187cdb | |
|
eb6b554c62 | |
|
93fe51f8f8 | |
|
e71e54b6c7 | |
|
d1a44e20ad |
|
@ -0,0 +1,86 @@
|
|||
version: 2
|
||||
name: build
|
||||
description: zCore构建测试
|
||||
global:
|
||||
concurrent: false
|
||||
param:
|
||||
- ref: rust_toolchain
|
||||
name: rust_toolchain
|
||||
type: STRING
|
||||
required: false
|
||||
value: '"nightly-2022-08-05"'
|
||||
trigger:
|
||||
webhook: gitlink@1.0.0
|
||||
event:
|
||||
- ref: push
|
||||
ruleset-operator: AND
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.5
|
||||
input:
|
||||
remote_url: '"https://gitlink.org.cn/zhenxing/zCore.git"'
|
||||
ref: '"refs/heads/master"'
|
||||
commit_id: '""'
|
||||
depth: 1
|
||||
needs:
|
||||
- start
|
||||
- ref: shell_0
|
||||
name: workspace
|
||||
image: ubuntu:22.10
|
||||
env:
|
||||
GIT_PATH: git_clone_0.git_path
|
||||
TZ: '"Asia/Shanghai"'
|
||||
script:
|
||||
- . $JM_SHARE_DIR/.cargo/env
|
||||
- cp $GIT_PATH/.devops/config $JM_SHARE_DIR/.cargo/
|
||||
- cat $JM_SHARE_DIR/.cargo/config
|
||||
- export CARGO_HOME=$JM_SHARE_DIR/.cargo
|
||||
- export RUSTUP_HOME=$JM_SHARE_DIR/.rustup
|
||||
- ""
|
||||
- echo "${TZ}"
|
||||
- echo "${TZ}" > /etc/timezone
|
||||
- ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime
|
||||
- apt update
|
||||
- apt install tzdata ca-certificates -y
|
||||
- apt install -y build-essential
|
||||
- ""
|
||||
- cd $GIT_PATH
|
||||
- cargo fmt --all -- --check
|
||||
- cargo build --all-features
|
||||
- cargo clippy --all-features
|
||||
- make zircon-init
|
||||
- cargo doc --no-deps --all-features --workspace
|
||||
needs:
|
||||
- shell_1
|
||||
- git_clone_0
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- shell_0
|
||||
- ref: shell_1
|
||||
name: rust-toolchain
|
||||
image: ubuntu:22.10
|
||||
script:
|
||||
- apt update
|
||||
- apt install curl -y
|
||||
- export RUSTUP_HOME=$JM_SHARE_DIR/.rustup
|
||||
- export CARGO_HOME=$JM_SHARE_DIR/.cargo
|
||||
- cd $JM_SHARE_DIR
|
||||
- mkdir .rustup .cargo
|
||||
- pwd
|
||||
- curl -sSf https://sh.rustup.rs -o rustup.rs
|
||||
- sh rustup.rs --profile minimal --default-toolchain nightly -c
|
||||
rust-src,rustfmt,clippy -y
|
||||
- pwd
|
||||
- ls .* -d
|
||||
- ls $HOME/.* -d
|
||||
- . $CARGO_HOME/env
|
||||
- cargo --version
|
||||
needs:
|
||||
- start
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[source.crates-io]
|
||||
replace-with = 'tuna'
|
||||
|
||||
[source.tuna]
|
||||
registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"
|
|
@ -0,0 +1,33 @@
|
|||
version: 2
|
||||
name: test
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: shell_0
|
||||
name: shell
|
||||
on-failure: ignore
|
||||
image: ubuntu:22.10
|
||||
env:
|
||||
TZ: '"Asia/Shanghai"'
|
||||
script:
|
||||
- echo $JM_SHARE_DIR
|
||||
- cd $JM_SHARE_DIR
|
||||
- date
|
||||
- echo "${TZ}" > /etc/timezone
|
||||
- ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime
|
||||
- apt update
|
||||
- apt install -y tzdata
|
||||
- date
|
||||
- apt search ca-certificates
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- shell_0
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
**/.*/*
|
||||
!.github/*
|
||||
!.cargo/*
|
||||
!.devops/*
|
||||
|
||||
**/target
|
||||
*.bin
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: build
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
steps:
|
||||
- name: workspace
|
||||
image: rust:alpine
|
||||
commands:
|
||||
- cargo fmt --all -- --check
|
||||
- cargo build --all-features
|
||||
- cargo clippy --all-features
|
||||
- cargo doc --all-features --no-deps
|
||||
- name: test-libos
|
||||
image: rust:alpine
|
||||
commands:
|
||||
- cargo build --package zcore --features linux libos
|
||||
- cargo build --package zcore --features zircon libos
|
||||
- cargo clippy --package zcore --features linux libos
|
||||
- cargo clippy --package zcore --features zircon libos
|
||||
|
||||
- name: test-bare-metal
|
||||
image: rust:alpine
|
||||
commands:
|
||||
- make -C zCore build ARCH=x86_64
|
||||
- make -C zCore clippy ARCH=x86_64
|
||||
- make -C zCore build ARCH=riscv64 LINUX=1
|
||||
- make -C zCore clippy ARCH=riscv64 LINUX=1
|
||||
- make -C zCore build ARCH=aarch64 LINUX=1
|
||||
- make -C zCore clippy ARCH=aarch64 LINUX=1
|
||||
- name: build-user
|
||||
image: rust:alpine
|
||||
commands:
|
||||
- git lfs pull -I prebuilt/zircon/x64/libc.so,prebuilt/zircon/x64/libfdio.so,prebuilt/zircon/x64/libunwind.so,prebuilt/zircon/x64/libzircon.so,prebuilt/zircon/x64/Scrt1.o
|
||||
- make -C zircon-user build MODE=release
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- push
|
Loading…
Reference in New Issue