Skip to content

Commit

Permalink
ci: Fix CI
Browse files Browse the repository at this point in the history
- Set up required dependencies before building.
- Update some action versions.
- Only cache LLVM binary archive.
- Fix environment variable usage.
  • Loading branch information
trungnt2910 committed Jul 21, 2023
1 parent 5328870 commit e13b242
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ jobs:
submodules: recursive

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.10
uses: gittools/actions/gitversion/setup@v0.10.2
with:
versionSpec: '5.x'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.10
uses: gittools/actions/gitversion/execute@v0.10.2

- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.5
uses: NuGet/setup-nuget@v1.2.0

- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v3
Expand All @@ -50,6 +50,9 @@ jobs:
- name: Restore tools
run: dotnet tool restore

- name: Install build dependencies
run: sudo apt install -y git cmake ninja-build

- name: Build .NET rootfs
run: |
git clone --depth=1 https://github.com/dotnet/arcade
Expand All @@ -64,13 +67,13 @@ jobs:
- name: Fetch cached LLVM build
uses: actions/cache@v3
with:
path: external/CppSharp/build/llvm
path: external/CppSharp/build/llvm/*.tar.xz
key: ${{ steps.llvm-build-id.outputs.id }}

- name: Build and install workload
run: |
export ROOTFS_DIR=${{ github.workspace }}/rootfs
dotnet cake build.cake --target=InstallWorkload --configuration=$env:BUILD_CONFIG --build-version=${{ steps.gitversion.outputs.majorMinorPatch }} --package-version=${{ steps.gitversion.outputs.semVer }}
dotnet cake build.cake --target=InstallWorkload --configuration=${{ env.BUILD_CONFIG }} --build-version=${{ steps.gitversion.outputs.majorMinorPatch }} --package-version=${{ steps.gitversion.outputs.semVer }}
- name: Publish nuget artifacts
uses: actions/upload-artifact@v2
Expand Down

0 comments on commit e13b242

Please sign in to comment.