File: ci.yml

package info (click to toggle)
openrct2-objects 1.7.6%2Bdfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 28,024 kB
  • sloc: javascript: 316; python: 307; makefile: 25
file content (72 lines) | stat: -rw-r--r-- 2,362 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: CI
on: [push, pull_request]
jobs:
  build-objexport:
    name: Build objexport
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup .NET Core SDK
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: '6.0.x'
      - name: Restore
        working-directory: tools/objexport
        run: dotnet restore
      - name: Build
        working-directory: tools/objexport
        run: dotnet build --configuration Release --no-restore
      - name: Test
        working-directory: tools/objexport
        run: |
          dotnet run --no-restore || ec=$?
          if [ $ec = 1 ]; then
              exit 0
          else
              exit 1
          fi
      - name: Publish (linux-x64)
        working-directory: tools/objexport
        run: dotnet publish -c Release -r linux-x64 -o ../../artifacts
      - name: Publish (win-x64)
        working-directory: tools/objexport
        run: dotnet publish -c Release -r win-x64 -o ../../artifacts
      - name: Upload artifacts
        uses: actions/upload-artifact@v4
        with:
          name: "objexport"
          path: |
            artifacts/objexport
            artifacts/objexport.exe
  build-objects:
    name: Build objects
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v4
    - name: Download gxc
      run: |
        curl -Lo tools.tar.gz https://github.com/IntelOrca/libsawyer/releases/download/v1.3.0/libsawyer-tools-linux-x64.tar.gz
        mkdir -p "$GITHUB_WORKSPACE/bin"
        tar -C "$GITHUB_WORKSPACE/bin" -xf tools.tar.gz
        echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
    - name: Create objects.zip
      run: ./tools/scripts/build.mjs
    - name: Upload artifacts
      uses: actions/upload-artifact@v4
      with:
        name: "OpenRCT2 Objects"
        path: artifacts/objects.zip
    - name: Calculate SHA256
      run: |
        echo "SHA256=$(sha256sum artifacts/objects.zip | awk '{printf $1}')" >> $GITHUB_OUTPUT
      id: calculate_sha256
    - name: Create release
      uses: softprops/action-gh-release@v1
      if: startsWith(github.ref, 'refs/tags/v')
      with:
        fail_on_unmatched_files: true
        files: artifacts/objects.zip
        body: "\nSHA256: ${{ steps.calculate_sha256.outputs.SHA256 }}"
        append_body: true