-
Notifications
You must be signed in to change notification settings - Fork 2
119 lines (99 loc) · 2.94 KB
/
main.yml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Build MinGW and MSYS2 toolchains
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
msys2_packages_branch:
description: "MSYS2-packages branch to build"
type: string
required: false
default: "woarm64"
mingw_packages_branch:
description: "MINGW-packages branch to build"
type: string
required: false
default: "woarm64"
jobs:
mingw-cross-toolchain:
name: MinGW cross-compilation toolchain
uses: ./.github/workflows/mingw-cross-toolchain.yml
with:
msys2_packages_branch: ${{ inputs.msys2_packages_branch || 'woarm64' }}
mingw-native-toolchain:
name: MinGW native toolchain
uses: ./.github/workflows/mingw-native-toolchain.yml
with:
mingw_packages_branch: ${{ inputs.mingw_packages_branch || 'woarm64' }}
repository:
name: Create MSYS2 repository
needs: [
mingw-cross-toolchain,
mingw-native-toolchain
]
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: Windows-on-ARM-Experiments/setup-msys2@main
with:
msystem: MSYS
update: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
pacman -S --noconfirm \
git \
mingw-w64-x86_64-github-cli \
mingw-w64-x86_64-jq
- name: Download artifacts
run: |
`cygpath "${{ github.workspace }}"`/.github/scripts/download-artifacts.sh \
${{ github.run_id }} \
'${{ needs.mingw-cross-toolchain.outputs.artifacts }}' \
'${{ needs.mingw-native-toolchain.outputs.artifacts }}'
- name: Create MSYS2 packages repository
run: |
`cygpath "${{ github.workspace }}"`/.github/scripts/create-repository.sh
- name: Create index.html
run: |
echo "<!DOCTYPE html><head></head><body></body>" > repository/index.html
- name: Upload woarm64-msys2-repository
uses: actions/upload-pages-artifact@v3
with:
name: woarm64-msys2-repository
retention-days: 7
path: repository
deploy:
#if: github.ref == 'refs/heads/main'
name: Deploy MSYS2 repository
needs: repository
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
defaults:
run:
shell: bash {0}
steps:
- name: Setup GitHub Pages
uses: actions/configure-pages@v4
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: woarm64-msys2-repository
check:
name: Check MSYS2 repository
needs: deploy
uses: ./.github/workflows/check-repository.yml