summaryrefslogtreecommitdiff
path: root/.github/workflows/test.yml
blob: 4a576d152a2eef2a83e2c99fc1a60723f14cf6b8 (plain) (blame)
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
#
#   Copyright (C) 2021 Reiko Asakura. All Rights Reserved.
#
#   Vita Development Suite Libraries
#

name: Test

on:
  push:
  schedule:
    - cron:  '0 10 * * *'

env:
  SCE_ROOT_DIR: ${{ github.workspace }}/ci-base/SCE
  SCE_PSP2_SDK_DIR: ${{ github.workspace }}/ci-base/sdk
  PSP2SNC: ${{ github.workspace }}/ci-base/sdk/host_tools/build/bin/psp2snc.exe

jobs:

  test:
    name: Test
    runs-on: windows-latest
    steps:

      - name: Checkout
        uses: actions/checkout@v2

      - name: Checkout CI base
        uses: actions/checkout@v2
        with:
          repository: Vita-Development-Suite/ci-base
          path: ci-base
          token: ${{ secrets.PRIVATE_REPO_TOKEN }}

      - name: Compile
        run: |
          python3 scripts/gen-test-compile.py
          if ($LastExitCode -ne 0) { exit $LastExitCode }
          Get-ChildItem -File common-*.cpp
            | ForEach-Object {
                echo "Compiling $_"
                ${{ env.PSP2SNC }} $_ -I include/common
                if ($LastExitCode -ne 0) { exit $LastExitCode }
              }
          Get-ChildItem -File user-*.cpp
            | ForEach-Object {
                echo "Compiling $_"
                ${{ env.PSP2SNC }} $_ -I include/user -I include/common
                if ($LastExitCode -ne 0) { exit $LastExitCode }
              }
          Get-ChildItem -File kernel-*.cpp
            | ForEach-Object {
                echo "Compiling $_"
                ${{ env.PSP2SNC }} $_ -I include/kernel -I include/common
                if ($LastExitCode -ne 0) { exit $LastExitCode }
              }
          echo "Compiling all-common.cpp"
          ${{ env.PSP2SNC }} all-common.cpp -I include/common
          if ($LastExitCode -ne 0) { exit $LastExitCode }
          echo "Compiling all-user.cpp"
          ${{ env.PSP2SNC }} all-user.cpp -I include/user -I include/common
          if ($LastExitCode -ne 0) { exit $LastExitCode }
          echo "Compiling all-kernel.cpp"
          ${{ env.PSP2SNC }} all-kernel.cpp -I include/kernel -I include/common
          if ($LastExitCode -ne 0) { exit $LastExitCode }