|
1 | | -name: linux-build |
2 | | - |
3 | | -on: |
4 | | - workflow_call: |
5 | | - outputs: |
6 | | - artifact-name: |
7 | | - description: "Linux bits" |
8 | | - value: linux-bits |
9 | | - |
10 | | -jobs: |
11 | | - build: |
12 | | - runs-on: ubuntu-latest |
13 | | - |
14 | | - steps: |
15 | | - - uses: actions/checkout@v1 |
16 | | - name: Checkout Code |
17 | | - |
18 | | - # Necessary for running neato |
19 | | - - name: Install libgts |
20 | | - run: sudo apt-get update && sudo apt-get install -y libgts-0.7-5 |
21 | | - |
22 | | - - name: Setup .NET |
23 | | - uses: actions/setup-dotnet@v3 |
24 | | - with: |
25 | | - dotnet-version: 8.0.x |
26 | | - |
27 | | - - name: Restore Tools |
28 | | - run: dotnet tool restore |
29 | | - |
30 | | - - name: Restore NuGet Packages |
31 | | - run: dotnet restore Rubjerg.Graphviz.sln |
32 | | - |
33 | | - - name: Print PWD |
34 | | - run: pwd |
35 | | - |
36 | | - - name: Build App |
37 | | - run: dotnet build Rubjerg.Graphviz.sln --configuration Release --no-restore |
38 | | - |
39 | | - - name: Build App Another Time because dot net sucks and cannot see the native dependencies the first time |
40 | | - run: dotnet build Rubjerg.Graphviz.sln --configuration Release --no-restore |
41 | | - |
42 | | - - name: Debug Intermediate Output |
43 | | - run: ls -la /home/runner/work/Graphviz.NetWrapper/Graphviz.NetWrapper/Rubjerg.Graphviz/Resources |
44 | | - |
45 | | - - name: Debug Build Output |
46 | | - run: ls -la /home/runner/work/Graphviz.NetWrapper/Graphviz.NetWrapper/Rubjerg.Graphviz/bin/x64/Release/netstandard2.0/ |
47 | | - |
48 | | - - name: Restore (just built) NuGet Packages for Tests |
49 | | - run: dotnet restore Rubjerg.Graphviz.Tests.sln |
50 | | - |
51 | | - - name: Build Tests |
52 | | - run: dotnet build Rubjerg.Graphviz.Tests.sln --configuration Release --no-restore |
53 | | - |
54 | | - - name: Run Unittests |
55 | | - run: bash run-tests-netcore.sh Rubjerg.Graphviz.Test/Rubjerg.Graphviz.Test.csproj |
56 | | - |
57 | | - - name: Run Transitive Tests |
58 | | - run: bash run-tests-netcore.sh Rubjerg.Graphviz.TransitiveTest/Rubjerg.Graphviz.TransitiveTest.csproj |
59 | | - |
60 | | - - name: Locate nupkg |
61 | | - id: pkg |
62 | | - run: | |
63 | | - pkg=$(find . -name "Rubjerg.Graphviz.*.nupkg" | head -1) |
64 | | - echo "package=$pkg" >> "$GITHUB_OUTPUT" |
65 | | -
|
66 | | - - uses: actions/upload-artifact@v4 |
67 | | - with: |
68 | | - name: linux-bits |
69 | | - path: ${{ steps.pkg.outputs.package }} |
70 | | - retention-days: 3 |
| 1 | +name: linux-build |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + outputs: |
| 6 | + artifact-name: |
| 7 | + description: "Linux bits" |
| 8 | + value: linux-bits |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + name: Checkout Code |
| 17 | + |
| 18 | + # Necessary for running neato |
| 19 | + - name: Install libgts |
| 20 | + run: sudo apt-get update && sudo apt-get install -y libgts-0.7-5 |
| 21 | + |
| 22 | + - name: Setup .NET |
| 23 | + uses: actions/setup-dotnet@v3 |
| 24 | + with: |
| 25 | + dotnet-version: 8.0.x |
| 26 | + |
| 27 | + - name: Setup Just |
| 28 | + uses: extractions/setup-just@v3 |
| 29 | + |
| 30 | + - name: Restore tools |
| 31 | + run: just restore-tools |
| 32 | + |
| 33 | + - name: Restore NuGet packages |
| 34 | + run: just restore |
| 35 | + |
| 36 | + - name: Build app |
| 37 | + run: just build-package |
| 38 | + |
| 39 | + - name: Restore NuGet packages for tests |
| 40 | + run: just restore-tests |
| 41 | + |
| 42 | + - name: Build tests |
| 43 | + run: just build-tests |
| 44 | + |
| 45 | + - name: Run unit tests (.NET 8) |
| 46 | + shell: bash |
| 47 | + run: just test Rubjerg.Graphviz.Test/Rubjerg.Graphviz.Test.csproj |
| 48 | + |
| 49 | + - name: Run transitive tests (.NET 8) |
| 50 | + shell: bash |
| 51 | + run: just test Rubjerg.Graphviz.TransitiveTest/Rubjerg.Graphviz.TransitiveTest.csproj |
| 52 | + |
| 53 | + - name: Locate nupkg |
| 54 | + id: pkg |
| 55 | + run: | |
| 56 | + pkg=$(find . -name "Rubjerg.Graphviz.*.nupkg" | head -1) |
| 57 | + echo "package=$pkg" >> "$GITHUB_OUTPUT" |
| 58 | +
|
| 59 | + - uses: actions/upload-artifact@v4 |
| 60 | + with: |
| 61 | + name: linux-bits |
| 62 | + path: ${{ steps.pkg.outputs.package }} |
| 63 | + retention-days: 3 |
0 commit comments