Skip to content

Commit 9373b7a

Browse files
committed
update: 简化ci流程,加快速度
1 parent ac16d34 commit 9373b7a

File tree

2 files changed

+8
-38
lines changed

2 files changed

+8
-38
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,10 @@ jobs:
2727
fail-fast: true
2828
steps:
2929
- uses: actions/checkout@v4
30-
- name: environment prepare
31-
run: |
32-
sudo apt-get update
33-
sudo apt-get install -y apt-transport-https
34-
sudo apt-get update
35-
sudo apt-get install -y dotnet-sdk-8.0
36-
sudo apt-get install -y p7zip-full
37-
- name: build
38-
env:
39-
DOTNETOS: ${{ matrix.dotnetos }}
40-
DOTNETARCH: ${{ matrix.dotnetarch }}
41-
run: |
42-
cd llcomNext/LLCOM
43-
dotnet publish -r $DOTNETOS-$DOTNETARCH --configuration Release -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -p:PublishTrimmed=true -p:TrimMode=link
44-
mkdir pkg
45-
mv bin/Release/net8.0/$DOTNETOS-$DOTNETARCH/publish/* pkg/
46-
if [[ "$DOTNETOS-$DOTNETARCH" =~ "win-" ]]; then :; else mv pkg/ llcom/; tar -cvf llcom.tar llcom/; mkdir pkg; mv llcom.tar pkg/; fi
30+
- name: Setup .NET
31+
uses: actions/setup-dotnet@v4
32+
with:
33+
dotnet-version: '8.0.x'
4734

4835
- uses: actions/upload-artifact@v4
4936
with:

.github/workflows/test.yml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,10 @@ jobs:
1919
runs-on: ${{ matrix.os }}
2020
steps:
2121
- uses: actions/checkout@v4
22-
23-
- name: Set up .NET on Linux
24-
if: runner.os == 'Linux'
25-
run: |
26-
sudo apt-get update
27-
sudo apt-get install -y apt-transport-https
28-
sudo apt-get update
29-
sudo apt-get install -y dotnet-sdk-8.0
30-
31-
- name: Set up .NET on Windows
32-
if: runner.os == 'Windows'
33-
run: choco install dotnet-sdk --version=8.0.407
34-
35-
- name: Set up .NET on macOS
36-
if: runner.os == 'macOS'
37-
run: |
38-
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 8.0 --install-dir $HOME/.dotnet --no-path
39-
echo 'export DOTNET_ROOT=$HOME/.dotnet' >> $HOME/.bash_profile
40-
echo 'export PATH=$PATH:$HOME/.dotnet' >> $HOME/.bash_profile
41-
source $HOME/.bash_profile
42-
dotnet --version
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: '8.0.x'
4326

4427
- name: Test
4528
run: |

0 commit comments

Comments
 (0)