From d9492c34236fa25ed01d99cb4dfeb6cb42e457fa Mon Sep 17 00:00:00 2001 From: Kouji Matsui Date: Sun, 17 Oct 2021 14:22:53 +0900 Subject: [PATCH] Testing configuration variables. --- .github/workflows/build-linux.yaml | 24 +++++++++++++++--------- .github/workflows/build-windows.yaml | 25 ++++++++++++++----------- il2c.sln | 2 ++ 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-linux.yaml b/.github/workflows/build-linux.yaml index a400e496..1764dcc5 100644 --- a/.github/workflows/build-linux.yaml +++ b/.github/workflows/build-linux.yaml @@ -15,6 +15,9 @@ on: jobs: build: runs-on: ubuntu-latest + #TODO: + env: + buildConfiguration: Release steps: - uses: actions/checkout@v2 with: @@ -36,23 +39,26 @@ jobs: - name: Install dependencies run: | dotnet restore il2c.sln + dotnet restore samples/Calculator/Calculator.Core/Calculator.csproj # dotnet restore samples/GettingStartedIL2C/GettingStartedIL2C.sln # dotnet restore samples/Calculator/Calculator.sln - name: Build runtime library - run: bash build-runtime.sh $(buildConfiguration) + run: bash build-runtime.sh ${{env.buildConfiguration}} - name: Build il2c - run: dotnet build --configuration $(buildConfiguration) --no-restore -p:BuildIdentifier="$(GITHUB_RUN_NUMBER)" -p:Platform="Any CPU" il2c.sln + run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform="Any CPU" il2c.sln # - name: Build GettingStartedIL2C-x86 -# run: dotnet build --configuration $(buildConfiguration) --no-restore -p:BuildIdentifier="$(GITHUB_RUN_NUMBER)" -p:Platform=x86 samples/GettingStartedIL2C/GettingStartedIL2C.sln +# run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x86 samples/GettingStartedIL2C/GettingStartedIL2C.sln # - name: Build GettingStartedIL2C-x64 -# run: dotnet build --configuration $(buildConfiguration) --no-restore -p:BuildIdentifier="$(GITHUB_RUN_NUMBER)" -p:Platform=x64 samples/GettingStartedIL2C/GettingStartedIL2C.sln +# run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x64 samples/GettingStartedIL2C/GettingStartedIL2C.sln + - name: Build Calculator.Core + run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x64 samples/Calculator/Calculator.Core/Calculator.Core.csproj # - name: Build Calculator-x86 -# run: dotnet build --configuration $(buildConfiguration) --no-restore -p:BuildIdentifier="$(GITHUB_RUN_NUMBER)" -p:Platform=x86 samples/Calculator/Calculator.sln +# run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x86 samples/Calculator/Calculator.sln # - name: Build Calculator-x64 -# run: dotnet build --configuration $(buildConfiguration) --no-restore -p:BuildIdentifier="$(GITHUB_RUN_NUMBER)" -p:Platform=x64 samples/Calculator/Calculator.sln +# run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x64 samples/Calculator/Calculator.sln - name: Build Calculator-CMake-mingw32 - run: bash build.sh $(buildConfiguration) - working-directory: "samples/Calculator/Calculator.CMake" + run: bash build.sh ${{env.buildConfiguration}} + working-directory: samples/Calculator/Calculator.CMake - name: Test il2c - run: dotnet test --no-restore --verbosity normal --configuration $(buildConfiguration) --no-restore -p:BuildIdentifier="$(GITHUB_RUN_NUMBER)" -p:Platform=x64 -p:CITest=True "tests/IL2C.Core.Test.Fixture/bin/$(buildConfiguration)/**/IL2C.Core.Test.Fixture.dll" + run: dotnet test --no-restore --verbosity normal --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x64 -p:CITest=True tests/IL2C.Core.Test.Fixture/bin/${{env.buildConfiguration}}/**/IL2C.Core.Test.Fixture.dll timeout-minutes: 10 diff --git a/.github/workflows/build-windows.yaml b/.github/workflows/build-windows.yaml index 3614627f..9d5721c3 100644 --- a/.github/workflows/build-windows.yaml +++ b/.github/workflows/build-windows.yaml @@ -15,6 +15,9 @@ on: jobs: build: runs-on: windows-latest + #TODO: + env: + buildConfiguration: Release steps: - uses: actions/checkout@v2 with: @@ -37,25 +40,25 @@ jobs: - name: Install dependencies run: | dotnet restore il2c.sln - dotnet restore samples/GettingStartedIL2C/GettingStartedIL2C.sln - dotnet restore samples/Calculator/Calculator.sln + dotnet restore samples\GettingStartedIL2C\GettingStartedIL2C.sln + dotnet restore samples\Calculator\Calculator.sln - name: Build runtime library - run: build-runtime.bat $(buildConfiguration) + run: build-runtime.bat ${{env.buildConfiguration}} shell: cmd - name: Build il2c - run: dotnet build --configuration $(buildConfiguration) --no-restore -p:BuildIdentifier="$(GITHUB_RUN_NUMBER)" -p:Platform="Any CPU" il2c.sln + run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform="Any CPU" il2c.sln - name: Build GettingStartedIL2C-x86 - run: dotnet build --configuration $(buildConfiguration) --no-restore -p:BuildIdentifier="$(GITHUB_RUN_NUMBER)" -p:Platform=x86 samples/GettingStartedIL2C/GettingStartedIL2C.sln + run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x86 samples\GettingStartedIL2C\GettingStartedIL2C.sln - name: Build GettingStartedIL2C-x64 - run: dotnet build --configuration $(buildConfiguration) --no-restore -p:BuildIdentifier="$(GITHUB_RUN_NUMBER)" -p:Platform=x64 samples/GettingStartedIL2C/GettingStartedIL2C.sln + run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x64 samples\GettingStartedIL2C\GettingStartedIL2C.sln - name: Build Calculator-x86 - run: dotnet build --configuration $(buildConfiguration) --no-restore -p:BuildIdentifier="$(GITHUB_RUN_NUMBER)" -p:Platform=x86 samples/Calculator/Calculator.sln + run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x86 samples\Calculator\Calculator.sln - name: Build Calculator-x64 - run: dotnet build --configuration $(buildConfiguration) --no-restore -p:BuildIdentifier="$(GITHUB_RUN_NUMBER)" -p:Platform=x64 samples/Calculator/Calculator.sln + run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x64 samples\Calculator\Calculator.sln - name: Build Calculator-CMake-mingw32 - run: build.bat $(buildConfiguration) + run: build.bat ${{env.buildConfiguration}} shell: cmd - working-directory: "samples/Calculator/Calculator.CMake" + working-directory: samples\Calculator\Calculator.CMake - name: Test il2c - run: dotnet test --no-restore --verbosity normal --configuration $(buildConfiguration) --no-restore -p:BuildIdentifier="$(GITHUB_RUN_NUMBER)" -p:Platform=x64 -p:CITest=True "tests/IL2C.Core.Test.Fixture/bin/$(buildConfiguration)/**/IL2C.Core.Test.Fixture.dll" + run: dotnet test --no-restore --verbosity normal --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x64 -p:CITest=True tests\IL2C.Core.Test.Fixture\bin\${{env.buildConfiguration}}\**\IL2C.Core.Test.Fixture.dll timeout-minutes: 10 diff --git a/il2c.sln b/il2c.sln index 79aea7fe..4d400cac 100644 --- a/il2c.sln +++ b/il2c.sln @@ -7,8 +7,10 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D105E6CD-626A-4C04-8AF6-0AA34A4E9CF4}" ProjectSection(SolutionItems) = preProject .gitignore = .gitignore + .github\workflows\build-linux.yaml = .github\workflows\build-linux.yaml build-runtime.bat = build-runtime.bat build-runtime.sh = build-runtime.sh + .github\workflows\build-windows.yaml = .github\workflows\build-windows.yaml il2c.sln.licenseheader = il2c.sln.licenseheader init-tools.bat = init-tools.bat init-tools.sh = init-tools.sh