--- /dev/null
+master:
+ api-level: API8
+ labels: [ API8 ]
+ tizen-branch: tizen
+ version-prefix: 8.0.0
+
+API7:
+ api-level: API7
+ labels: [ API7 ]
+ tizen-branch: tizen_5.5
+ version-prefix: 7.0.0
+
+API6:
+ api-level: API6
+ labels: [ API6 ]
+ tizen-branch: tizen_5.5_tv
+ version-prefix: 6.0.0
+
+API5:
+ api-level: API5
+ labels: [ API5 ]
+ tizen-branch: tizen_5.0
+ version-prefix: 5.0.0
+
+API4:
+ api-level: API4
+ labels: [ API4 ]
+ tizen-branch: tizen_4.0
+ version-prefix: 4.0.1
--- /dev/null
+name: Build Branches
+
+on:
+ push:
+ branches:
+ - master
+ - API*
+
+ paths:
+ - 'build/**'
+ - 'internals/**'
+ - 'src/**'
+ - 'tools/**'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Setup .NET Core
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 3.1.x
+
+ - name: Build
+ run: ./build.sh full
+
--- /dev/null
+name: "Build Pull Request"
+
+on:
+ pull_request:
+ branches:
+ - master
+ - API*
+
+jobs:
+
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Setup .NET Core
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 3.1.x
+
+ - name: Get Changed Files
+ uses: lots0logs/gh-action-get-changed-files@2.1.4
+ id: getChangedFiles
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Build
+ id: build
+ uses: TizenAPI/tizenfx-build-actions/problem-filter@master
+ with:
+ run: ./build.sh full /p:BuildWithAnalyzer=True -consoleloggerparameters:NoSummary
+ files: ${{ steps.getChangedFiles.outputs.all }}
+
+ - name: Save Error Report
+ if: ${{ failure() && steps.build.outputs.errors }}
+ env:
+ BUILD_ERRORS: ${{ steps.build.outputs.errors }}
+ run: |
+ mkdir Artifacts
+ echo $BUILD_ERRORS > Artifacts/errors.json
+
+ - name: Pack
+ run: ./build.sh pack
+
+ - name: Checkout APITool
+ uses: actions/checkout@v2
+ with:
+ repository: TizenAPI/APITool
+ path: .apitool
+
+ - name: Extract API
+ run: |
+ dotnet run -p .apitool/ \
+ -- print --format=json --include-hidden \
+ -o Artifacts/api.json Artifacts/bin/public/
+
+ - uses: actions/upload-artifact@v2
+ if: ${{ always() }}
+ with:
+ name: reports
+ if-no-files-found: ignore
+ path: Artifacts/*.json
+
+ check-api:
+ needs: [build]
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ ref: ${{ github.base_ref }}
+
+ - name: Setup .NET Core
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 3.1.x
+
+ - name: Build Base Branch
+ uses: TizenAPI/tizenfx-build-actions/problem-filter@master
+ with:
+ run: ./build.sh full
+
+ - name: Checkout APITool
+ uses: actions/checkout@v2
+ with:
+ repository: TizenAPI/APITool
+ path: .apitool
+
+ - name: Extract Base API
+ run: |
+ dotnet run -p .apitool/ \
+ -- print --format=json --include-hidden \
+ -o Artifacts/base-api.json Artifacts/bin/public/
+
+ - name: Download Artifacts
+ uses: actions/download-artifact@v2
+ with:
+ name: reports
+ path: Artifacts
+
+ - name: Check API Compatibilities
+ uses: TizenAPI/tizenfx-build-actions/apidb-compare@master
+ with:
+ file: Artifacts/api.json
+ base-file: Artifacts/base-api.json
+ output: Artifacts/api-comp.json
+
+ - uses: actions/upload-artifact@v2
+ with:
+ name: reports
+ path: Artifacts/api-comp.json
+++ /dev/null
-name: Build
-
-on:
- pull_request:
- branches:
- - master
- - API*
-
- push:
- branches:
- - master
- - API*
- paths:
- - 'build/**'
- - 'internals/**'
- - 'src/**'
- - 'tools/**'
-
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
-
- - name: Setup .NET Core
- uses: actions/setup-dotnet@v1
- with:
- dotnet-version: 3.1.x
-
- - uses: lots0logs/gh-action-get-changed-files@2.1.4
- id: getChangedFiles
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Build
- uses: TizenAPI/tizenfx-build-actions/problem-filter@v1
- with:
- run: ./build.sh full /p:BuildWithAnalyzer=True
- files: ${{ steps.getChangedFiles.outputs.all }}
--- /dev/null
+name: "Check API Level"
+
+on:
+ pull_request_target:
+ branches:
+ - master
+ - API*
+
+jobs:
+ add-labels:
+ runs-on: ubuntu-latest
+ steps:
+
+ - name: Get Branch Metadata
+ uses: TizenAPI/tizenfx-build-actions/branch-metadata@master
+ id: metadata
+ with:
+ ref: ${{ github.base_ref }}
+
+ - name: Add Labels
+ if: ${{ steps.metadata.outputs.data }}
+ uses: actions/github-script@v2
+ env:
+ BRANCH_METADATA: ${{ steps.metadata.outputs.data }}
+ with:
+ script: |
+ var metadata = JSON.parse(process.env.BRANCH_METADATA)
+ github.issues.addLabels({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ labels: metadata.labels
+ })
--- /dev/null
+name: "Postback Pull Request"
+
+on:
+ workflow_run:
+ workflows: ["Build Pull Request"]
+ types:
+ - completed
+
+jobs:
+ postback:
+ runs-on: ubuntu-latest
+ steps:
+
+ - name: Download Artifacts from Build
+ uses: TizenAPI/tizenfx-build-actions/download-workflow-artifacts@master
+ with:
+ token: ${{ secrets.TIZENAPI_GITHUB_TOKEN }}
+ run-id: ${{ github.event.workflow_run.id }}
+ name: reports
+ path: Artifacts
+
+ - name: Find Pull Request
+ id: pull_request
+ uses: actions/github-script@v2
+ env:
+ WORKFLOW_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
+ with:
+ script: |
+ const res = await github.pulls.list({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ state: 'open'
+ });
+ if (res.status === 200) {
+ const pr = res.data.find(d => d.head.sha == process.env.WORKFLOW_HEAD_SHA);
+ if (pr) {
+ core.setOutput('number', pr.number);
+ core.setOutput('base_ref', pr.base.ref);
+ }
+ }
+
+ - name: Report Error if Failure
+ if: ${{ github.event.workflow_run.conclusion == 'failure' }}
+ uses: actions/github-script@v2
+ env:
+ PR_NUMBER: ${{ steps.pull_request.outputs.number }}
+ with:
+ github-token: ${{ secrets.TIZENAPI_GITHUB_TOKEN }}
+ script: |
+ const fs = require('fs');
+ const json = fs.readFileSync('Artifacts/errors.json', 'utf8');
+ const errors = JSON.parse(json).join('\n');
+ github.issues.createComment({
+ issue_number: process.env.PR_NUMBER,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ body: '## Build Error:\n```\n' + errors + '\n```'
+ });
+
+ - name: Report API comparison result
+ if: ${{ github.event.workflow_run.conclusion == 'success' }}
+ uses: TizenAPI/tizenfx-build-actions/apidb-report@master
+ with:
+ token: ${{ secrets.TIZENAPI_GITHUB_TOKEN }}
+ issue-number: ${{ steps.pull_request.outputs.number }}
+ path: Artifacts/api-comp.json