Compare commits

...

12 Commits

Author SHA1 Message Date
xxq250 6b80fef93b refactor: delete .devops/未命名项目.yml 2023-03-29 16:36:27 +08:00
xxq250 446dc68b6e feat: .devops/未命名项目.yml 2023-03-29 16:35:50 +08:00
zhenxing 9367e66aac refactor: .devops/build.yml 2022-10-13 09:09:01 +08:00
shzhxh 94a13981bd update 2022-10-09 14:01:01 +08:00
zhenxing d2d6e2082c refactor: delete .devops/未命名项目.yml 2022-09-30 14:59:27 +08:00
zhenxing 18973418cc feat: .devops/未命名项目.yml 2022-09-30 14:58:48 +08:00
xxq250 a420c08f04 refactor: .devops/build.yml 2022-09-30 11:39:35 +08:00
xxq250 234d187cdb refactor: .devops/build.yml 2022-09-30 11:39:35 +08:00
shzhxh eb6b554c62 add .devops 2022-09-30 10:53:26 +08:00
shzhxh 93fe51f8f8 Merge branch 'master' into master-gitlink 2022-09-29 14:22:40 +08:00
zhenxing e71e54b6c7 Update '.trustie-pipeline.yml'
continuous-integration/drone/push Build is failing Details
2022-06-22 17:44:29 +08:00
zhenxing d1a44e20ad create pipeline 2022-06-22 17:41:32 +08:00
5 changed files with 167 additions and 0 deletions

86
.devops/build.yml Normal file
View File

@ -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

5
.devops/config Normal file
View File

@ -0,0 +1,5 @@
[source.crates-io]
replace-with = 'tuna'
[source.tuna]
registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"

33
.devops/test.yml Normal file
View File

@ -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
.gitignore vendored
View File

@ -1,6 +1,7 @@
**/.*/*
!.github/*
!.cargo/*
!.devops/*
**/target
*.bin

42
.trustie-pipeline.yml Normal file
View File

@ -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