forked from swiftlang/github-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (54 loc) · 2.1 KB
/
Copy pathproposal_validation.yml
File metadata and controls
61 lines (54 loc) · 2.1 KB
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
name: Proposal Validation
on:
workflow_call:
inputs:
project:
type: string
description: "Name of project supported by swift-evolution-metadata-extractor tool"
default: swift
workflow_test_enabled:
type: boolean
description: "Flag to test this workflow within the github-workflows repository"
default: false
jobs:
run-swift-evolution-metadata-extractor:
name: Validate proposals with swift-evolution-metadata-extractor
runs-on: ubuntu-latest
container:
image: "swift:6.2-noble"
timeout-minutes: 10
env:
RESOLVED_PR_NUMBER: ${{ case(inputs.workflow_test_enabled, '3331', github.event.number) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout swiftlang/swift-evolution-metadata-extractor (main)
uses: actions/checkout@v6
with:
repository: swiftlang/swift-evolution-metadata-extractor
ref: main
path: seme
- name: Create cache key
id: cache-key
run: echo "key=seme-$(git -C seme rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Restore cache
uses: actions/cache/restore@v5
id: restore-cache
with:
path: ${{ github.workspace }}/swift-evolution-metadata-extractor
key: ${{ steps.cache-key.outputs.key }}
- name: Build swift-evolution-metadata-extractor (release)
if: steps.restore-cache.outputs.cache-hit != 'true'
run: |
swift --version
swift build -c release --very-verbose
cp .build/release/swift-evolution-metadata-extractor $GITHUB_WORKSPACE/swift-evolution-metadata-extractor
working-directory: seme
- name: Save to cache
if: steps.restore-cache.outputs.cache-hit != 'true'
id: save-to-cache
uses: actions/cache/save@v5
with:
path: ${{ github.workspace }}/swift-evolution-metadata-extractor
key: ${{ steps.cache-key.outputs.key }}
- name: Validate proposals
run: $GITHUB_WORKSPACE/swift-evolution-metadata-extractor validate --pull-request $RESOLVED_PR_NUMBER