Skip to content

Commit fb61a64

Browse files
committed
Feat: Pipelines
1 parent 85362e3 commit fb61a64

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

.github/workflows/build-check-webapi.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
55
branches:
66
- main
77

8+
env:
9+
AOT: true
10+
TRIM: false
11+
EXTRA_OPTIMIZE: true
12+
BUILD_ARCHITECTURE: linux-x64
13+
BUILD_CONFIGURATION: Release
14+
815
jobs:
916
setup-build-test:
1017
runs-on: ubuntu-latest
@@ -24,7 +31,7 @@ jobs:
2431
global-json-file: global.json
2532

2633
- name: Restore Dependencies
27-
run: dotnet restore
34+
run: dotnet restore -r ${{ env.BUILD_ARCHITECTURE }} "./WebApi/WebApi.csproj" -p:Configuration=${${{ env.BUILD_CONFIGURATION }}} -p:AOT=${${{ env.AOT }}} -p:Trim=${${{ env.TRIM }}}
2835

2936
- name: Install GitVersion
3037
uses: gittools/actions/gitversion/setup@v0
@@ -38,7 +45,7 @@ jobs:
3845
updateAssemblyInfo: true
3946

4047
- name: Build Application
41-
run: dotnet build --configuration Debug --no-restore /p:Version=${{ env.GitVersion_SemVer }}
48+
run: dotnet build -r ${{ env.BUILD_ARCHITECTURE }} "WebApi.csproj" -c ${{ env.BUILD_CONFIGURATION }} -p:AOT=${${{ env.AOT }}} -p:Trim=${${{ env.TRIM }}} -p:ExtraOptimize=${${{ env.EXTRA_OPTIMIZE }}} -o /app/build
4249

4350
container-test:
4451
needs: setup-build-test

.github/workflows/main-release-webapi.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
55
branches:
66
- main
77

8+
env:
9+
AOT: true
10+
TRIM: false
11+
EXTRA_OPTIMIZE: true
12+
BUILD_ARCHITECTURE: linux-x64
13+
BUILD_CONFIGURATION: Release
14+
815
jobs:
916
setup-build-test:
1017
runs-on: ubuntu-latest
@@ -24,7 +31,7 @@ jobs:
2431
global-json-file: global.json
2532

2633
- name: Restore Dependencies
27-
run: dotnet restore
34+
run: dotnet restore -r ${{ env.BUILD_ARCHITECTURE }} "./WebApi/WebApi.csproj" -p:Configuration=${${{ env.BUILD_CONFIGURATION }}} -p:AOT=${${{ env.AOT }}} -p:Trim=${${{ env.TRIM }}}
2835

2936
- name: Install GitVersion
3037
uses: gittools/actions/gitversion/setup@v0
@@ -38,7 +45,7 @@ jobs:
3845
updateAssemblyInfo: true
3946

4047
- name: Build Application
41-
run: dotnet build --configuration Release --no-restore /p:Version=${{ env.GitVersion_SemVer }}
48+
run: dotnet build -r ${{ env.BUILD_ARCHITECTURE }} "WebApi.csproj" -c ${{ env.BUILD_CONFIGURATION }} -p:AOT=${${{ env.AOT }}} -p:Trim=${${{ env.TRIM }}} -p:ExtraOptimize=${${{ env.EXTRA_OPTIMIZE }}} -o /app/build
4249

4350
build-push-image:
4451
needs: setup-build-test
@@ -67,11 +74,11 @@ jobs:
6774
file: ./src/src/WebApi/Dockerfile
6875
tags: jonathanperis/rinha2-back-end-bora-dale-xgh:latest
6976
build-args: |
70-
AOT=true
71-
TRIM=false
72-
EXTRA_OPTIMIZE=true
73-
BUILD_ARCHITECTURE=linux-x64
74-
BUILD_CONFIGURATION=Release
77+
AOT=${{ env.AOT }}
78+
TRIM=${{ env.TRIM }}
79+
EXTRA_OPTIMIZE=${{ env.EXTRA_OPTIMIZE }}
80+
BUILD_ARCHITECTURE=${{ env.BUILD_ARCHITECTURE }}
81+
BUILD_CONFIGURATION=${{ env.BUILD_CONFIGURATION }}
7582
7683
container-test:
7784
needs: build-push-image

0 commit comments

Comments
 (0)