feat: 添加平台标识,为不同平台代码可做预编译指令. #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Test | |
on: | |
#push: | |
# branches: | |
# - main | |
pull_request: | |
branches: | |
- main | |
env: | |
DOTNET_VERSION: "9.0.x" | |
TZ: Asia/Shanghai | |
SOLUTION: EasilyNET.sln | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Restore dependencies | |
run: dotnet restore ${{ env.SOLUTION }} | |
- name: Build | |
run: dotnet build ${{ env.SOLUTION }} --no-restore | |
- name: Test | |
run: dotnet test ${{ env.SOLUTION }} --no-build --verbosity normal |