Skip to content

Commit f1c65d3

Browse files
authored
LLVM: Build webassembly target (#947)
* Fix get commit message collection in CI for PRs
1 parent 83c0721 commit f1c65d3

File tree

5 files changed

+31
-26
lines changed

5 files changed

+31
-26
lines changed

.github/workflows/vcpkg_ci_aws_amd64.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,22 @@ jobs:
8484
needs: start-runner # required to start the main job when the runner is ready
8585
runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner
8686
steps:
87-
# Used to get commit message since PRs are on a merge commit
8887
- uses: actions/checkout@v3
8988
with:
90-
ref: ${{ github.event.after }}
91-
submodules: false
89+
submodules: recursive
90+
fetch-depth: 2
91+
92+
# Used to get commit message since PRs are on a merge commit
9293
- name: Get commit message
9394
run: |
9495
echo 'COMMIT_MESSAGE<<EOF' >> "$GITHUB_ENV"
95-
echo "$(git log --format=%B -n 1 ${{ github.event.after }})" >> "$GITHUB_ENV"
96+
if [[ '${{ github.event_name }}' == 'push' ]]; then
97+
echo "$(git log --format=%B -n 1 HEAD)" >> "$GITHUB_ENV"
98+
elif [[ '${{ github.event_name }}' == 'pull_request' ]]; then
99+
echo "$(git log --format=%B -n 1 HEAD^2)" >> "$GITHUB_ENV"
100+
fi
96101
echo "EOF" >> "$GITHUB_ENV"
97102
98-
- uses: actions/checkout@v3
99-
with:
100-
submodules: recursive
101-
102103
- name: Clear prior vcpkg directory
103104
run: |
104105
rm -rf "${{ github.workspace }}/vcpkg"

.github/workflows/vcpkg_ci_aws_arm64.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,22 @@ jobs:
8484
needs: start-runner # required to start the main job when the runner is ready
8585
runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner
8686
steps:
87-
# Used to get commit message since PRs are on a merge commit
8887
- uses: actions/checkout@v3
8988
with:
90-
ref: ${{ github.event.after }}
91-
submodules: false
89+
submodules: recursive
90+
fetch-depth: 2
91+
92+
# Used to get commit message since PRs are on a merge commit
9293
- name: Get commit message
9394
run: |
9495
echo 'COMMIT_MESSAGE<<EOF' >> "$GITHUB_ENV"
95-
echo "$(git log --format=%B -n 1 ${{ github.event.after }})" >> "$GITHUB_ENV"
96+
if [[ '${{ github.event_name }}' == 'push' ]]; then
97+
echo "$(git log --format=%B -n 1 HEAD)" >> "$GITHUB_ENV"
98+
elif [[ '${{ github.event_name }}' == 'pull_request' ]]; then
99+
echo "$(git log --format=%B -n 1 HEAD^2)" >> "$GITHUB_ENV"
100+
fi
96101
echo "EOF" >> "$GITHUB_ENV"
97102
98-
- uses: actions/checkout@v3
99-
with:
100-
submodules: recursive
101-
102103
- name: Clear prior vcpkg directory
103104
run: |
104105
rm -rf "${{ github.workspace }}/vcpkg"

.github/workflows/vcpkg_ci_mac.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,22 @@ jobs:
4545
ARTIFACT_NAME: vcpkg_${{ matrix.os.runner }}_${{ matrix.llvm }}_xcode-${{ matrix.os.xcode }}_amd64
4646

4747
steps:
48-
# Used to get commit message since PRs are on a merge commit
4948
- uses: actions/checkout@v3
5049
with:
51-
ref: ${{ github.event.after }}
52-
submodules: false
50+
submodules: recursive
51+
fetch-depth: 2
52+
53+
# Used to get commit message since PRs are on a merge commit
5354
- name: Get commit message
5455
run: |
5556
echo 'COMMIT_MESSAGE<<EOF' >> "$GITHUB_ENV"
56-
echo "$(git log --format=%B -n 1 ${{ github.event.after }})" >> "$GITHUB_ENV"
57+
if [[ '${{ github.event_name }}' == 'push' ]]; then
58+
echo "$(git log --format=%B -n 1 HEAD)" >> "$GITHUB_ENV"
59+
elif [[ '${{ github.event_name }}' == 'pull_request' ]]; then
60+
echo "$(git log --format=%B -n 1 HEAD^2)" >> "$GITHUB_ENV"
61+
fi
5762
echo "EOF" >> "$GITHUB_ENV"
5863
59-
- uses: actions/checkout@v3
60-
with:
61-
submodules: recursive
62-
6364
- uses: actions/setup-dotnet@v2
6465
with:
6566
dotnet-version: '3.1.x' # SDK Version to use.

ports/llvm-13/vcpkg.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "llvm-13",
33
"version": "13.0.1",
4-
"port-version": 4,
4+
"port-version": 5,
55
"description": "The LLVM Compiler Infrastructure.",
66
"homepage": "https://llvm.org",
77
"supports": "!uwp & !(arm & windows)",
@@ -73,6 +73,7 @@
7373
"target-arm",
7474
"target-nvptx",
7575
"target-sparc",
76+
"target-webassembly",
7677
"target-x86"
7778
]
7879
}

ports/llvm-14/vcpkg.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "llvm-14",
33
"version": "14.0.3",
4-
"port-version": 3,
4+
"port-version": 4,
55
"description": "The LLVM Compiler Infrastructure.",
66
"homepage": "https://llvm.org",
77
"supports": "!uwp & !(arm & windows)",
@@ -85,6 +85,7 @@
8585
"target-arm",
8686
"target-nvptx",
8787
"target-sparc",
88+
"target-webassembly",
8889
"target-x86"
8990
]
9091
}

0 commit comments

Comments
 (0)