mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 11:16:47 +00:00
ci: change rust src to crates-io-index while using GitHub workflow (#1023)
Signed-off-by: longjin <longjin@DragonOS.org>
This commit is contained in:
parent
f5b2038871
commit
7b0ef10895
16
.github/workflows/makefile.yml
vendored
16
.github/workflows/makefile.yml
vendored
@ -12,14 +12,14 @@ jobs:
|
|||||||
name: Format check ${{ matrix.arch }}
|
name: Format check ${{ matrix.arch }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
container: dragonos/dragonos-dev:v1.4
|
container: dragonos/dragonos-dev:v1.5
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch: [x86_64, riscv64]
|
arch: [x86_64, riscv64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: echo "Running in dragonos/dragonos-dev:v1.4"
|
- run: echo "Running in dragonos/dragonos-dev:v1.5"
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Format check
|
- name: Format check
|
||||||
@ -35,14 +35,14 @@ jobs:
|
|||||||
name: Kernel static test ${{ matrix.arch }}
|
name: Kernel static test ${{ matrix.arch }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
container: dragonos/dragonos-dev:v1.4
|
container: dragonos/dragonos-dev:v1.5
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch: [x86_64, riscv64]
|
arch: [x86_64, riscv64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: echo "Running in dragonos/dragonos-dev:v1.4"
|
- run: echo "Running in dragonos/dragonos-dev:v1.5"
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
@ -56,10 +56,10 @@ jobs:
|
|||||||
build-x86_64:
|
build-x86_64:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: dragonos/dragonos-dev:v1.4
|
container: dragonos/dragonos-dev:v1.5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: echo "Running in dragonos/dragonos-dev:v1.4"
|
- run: echo "Running in dragonos/dragonos-dev:v1.5"
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: build the DragonOS
|
- name: build the DragonOS
|
||||||
@ -78,10 +78,10 @@ jobs:
|
|||||||
build-riscv64:
|
build-riscv64:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: dragonos/dragonos-dev:v1.4
|
container: dragonos/dragonos-dev:v1.5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: echo "Running in dragonos/dragonos-dev:v1.4"
|
- run: echo "Running in dragonos/dragonos-dev:v1.5"
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
@ -1 +1 @@
|
|||||||
v1.4
|
v1.5
|
@ -1,3 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
CONFIG_FILE=~/.cargo/config.toml
|
||||||
|
|
||||||
|
change_rust_src_to_official() {
|
||||||
|
echo -e "[source.crates-io] \n \
|
||||||
|
registry = \"sparse+https://index.crates.io/\" \n \
|
||||||
|
[net] \n \
|
||||||
|
git-fetch-with-cli = true \n \
|
||||||
|
" > $CONFIG_FILE
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check if the GITHUB_WORKFLOW environment variable is set and not empty
|
||||||
|
if [ -n "$GITHUB_ACTION" ]; then
|
||||||
|
change_rust_src_to_official
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user