Skip to content

Commit 0fc1f7a

Browse files
committed
Infra for building msvc compiler wrapper
1 parent 451bb04 commit 0fc1f7a

File tree

4 files changed

+72
-0
lines changed

4 files changed

+72
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
workflow_call:
3+
4+
jobs:
5+
build-file:
6+
runs-on: windows-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
with:
10+
fetch-depth: 0
11+
- name: Checkout Wrapper Source
12+
uses: actions/checkout@v4
13+
with:
14+
repository: spack/msvc-wrapper
15+
ref: v0.1.0
16+
fetch-tags: true
17+
# build and tests the wrapper
18+
- name: Build Wrapper
19+
run: |
20+
cd msvc-wrapper
21+
test\setup_and_drive_test.bat

.github/workflows/test-resources.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ jobs:
5252
(needs.build-mingw.result == 'success' || needs.build-mingw.result == 'skipped')
5353
needs: [build-mingw, changed]
5454
uses: ./.github/workflows/build-file.yml
55+
56+
build-msvc-wrapper:
57+
name: "Msvc compiler wrapper build"
58+
uses: ./.github/workflows/build-wrapper.yml

.github/workflows/update-resources.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@ jobs:
5050
(needs.build-upload-mingw.result == 'success' || needs.build-upload-mingw.result == 'skipped')
5151
needs: [build-upload-mingw, changed]
5252
uses: ./.github/workflows/update-file.yml
53+
54+
build-upload-msvc-wrapper:
55+
name: "Build and upload the msvc compiler wrapper"
56+
uses: ./.github/workflows/update-wrapper.yml
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
on:
2+
workflow_call:
3+
4+
jobs:
5+
build-file:
6+
runs-on: windows-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
with:
10+
fetch-depth: 0
11+
- name: Checkout Wrapper Source
12+
uses: actions/checkout@v4
13+
with:
14+
repository: spack/msvc-wrapper
15+
ref: v0.1.0
16+
fetch-tags: true
17+
# build and tests the wrapper
18+
- name: Build Wrapper
19+
run: |
20+
cd msvc-wrapper
21+
test\setup_and_drive_test.bat
22+
- name: Install Wrapper
23+
run: |
24+
cd msvc-wrapper
25+
nmake install PREFIX=wrapper-install
26+
- name: Bundle Wrapper
27+
run: |
28+
cd msvc-wrapper
29+
tar -cz wrapper-install > msvc-wrapper-0.1.0.tar.gz
30+
- name: Checkout pages
31+
run: |
32+
git fetch --all
33+
git checkout -f -B pages --track origin/pages
34+
- name: Config git user
35+
run: |
36+
git config --local user.email "action@github.com"
37+
git config --local user.name "Github Actions from commit ${{ github.sha }}"
38+
- name: Upload
39+
run: |
40+
mkdir resources/msvc-wrapper/0.1.0
41+
del /Q resources/msvc-wrapper/0.1.0/*
42+
mv msvc-wrapper/msvc-wrapper-0.1.0.tar.gz resources/msvc-wrapper/0.1.0/msvc-wrapper_0.1.0.tar.gz
43+
git add resources/msvc-wrapper/0.1.0/msvc-wrapper_0.1.0.tar.gz && git commit -m"Update msvc-wrapper binary" && git push -f

0 commit comments

Comments
 (0)