mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-28 03:43:23 +00:00
Bump and publish ostd-test
and ostd-macros
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
e50b05d1ee
commit
34b3aac2e3
52
.github/workflows/publish_osdk_and_ostd.yml
vendored
52
.github/workflows/publish_osdk_and_ostd.yml
vendored
@ -13,62 +13,22 @@ on:
|
||||
- VERSION
|
||||
|
||||
jobs:
|
||||
osdk-publish:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
container: asterinas/asterinas:0.8.0
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check Publish OSDK
|
||||
# On pull request, set `--dry-run` to check whether OSDK can publish
|
||||
- name: Publish OSTD and OSDK (dry run)
|
||||
# On pull request, set `--dry-run` to check whether they can be published
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
cd osdk
|
||||
cargo publish --dry-run
|
||||
|
||||
- name: Publish OSDK
|
||||
# On push, OSDK will be published
|
||||
if: github.event_name == 'push'
|
||||
env:
|
||||
REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
run: |
|
||||
cd osdk
|
||||
cargo publish --token ${REGISTRY_TOKEN}
|
||||
|
||||
ostd-publish:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
container: asterinas/asterinas:0.8.0
|
||||
strategy:
|
||||
matrix:
|
||||
# All supported targets, this array should keep consistent with
|
||||
# `package.metadata.docs.rs.targets` in `ostd/Cargo.toml`
|
||||
target: ['x86_64-unknown-none']
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check Publish OSTD and the test runner
|
||||
# On pull request, set `--dry-run` to check whether OSDK can publish
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
cd ostd
|
||||
cargo publish --target ${{ matrix.target }} --dry-run
|
||||
cargo doc --target ${{ matrix.target }}
|
||||
cd osdk/test-kernel
|
||||
cargo publish --target ${{ matrix.target }} --dry-run
|
||||
cargo doc --target ${{ matrix.target }}
|
||||
./tools/github_workflows/publish_osdk_and_ostd.sh --dry-run
|
||||
|
||||
- name: Publish OSTD and the test runner
|
||||
- name: Publish OSTD and OSDK
|
||||
if: github.event_name == 'push'
|
||||
env:
|
||||
REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
# Using any target that OSTD supports for publishing is ok.
|
||||
# Here we use the same target as
|
||||
# `package.metadata.docs.rs.default-target` in `ostd/Cargo.toml`.
|
||||
run: |
|
||||
cd ostd
|
||||
cargo publish --target x86_64-unknown-none --token ${REGISTRY_TOKEN}
|
||||
cd osdk/test-kernel
|
||||
cargo publish --target x86_64-unknown-none --token ${REGISTRY_TOKEN}
|
||||
|
||||
./tools/github_workflows/publish_osdk_and_ostd.sh --token ${REGISTRY_TOKEN}
|
||||
|
Reference in New Issue
Block a user