-
Notifications
You must be signed in to change notification settings - Fork 243
111 lines (111 loc) · 4.14 KB
/
windows-artifacts.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
name: Build Windows artifacts
on:
push:
branches:
- "main"
paths-ignore:
- 'docs/**'
- 'images/docs-builder/**'
- '*.adoc'
pull_request:
paths-ignore:
- 'docs/**'
- 'images/docs-builder/**'
- '*.adoc'
env:
IMAGE_NAME_E2E: crc-e2e
IMAGE_NAME_INTEGRATION: crc-integration
jobs:
build-installer:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['windows-2022']
go: ['1.22']
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Set path for heat.exe and light.exe
shell: bash
run: echo "$WIX\\bin" >>$GITHUB_PATH
- name: Build Windows installer
run: make out/windows-amd64/crc-windows-installer.zip
- name: Upload windows installer artifact
uses: actions/upload-artifact@v4
with:
name: windows-installer
path: "./out/windows-amd64/crc-windows-installer.zip"
- name: Build Linux binary
run: |
make out/linux-arm64/crc
- name: Upload linux binary
uses: actions/upload-artifact@v4
with:
name: linux-binary
path: "./out/linux-arm64/crc"
build-qe:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: ['darwin', 'windows', 'linux']
arch: ['amd64', 'arm64']
exclude:
- arch: 'arm64'
os: 'windows'
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Build qe oci images ${{matrix.os}}-${{matrix.arch}}
run: |
# e2e
CRC_E2E_IMG_VERSION=gh ARCH=${{matrix.arch}} OS=${{matrix.os}} make containerized_e2e
podman save -o ${{ env.IMAGE_NAME_E2E }}-${{matrix.os}}-${{matrix.arch}}.tar \
quay.io/crcont/${{ env.IMAGE_NAME_E2E}}:gh-${{matrix.os}}-${{matrix.arch}}
# integration
CRC_INTEGRATION_IMG_VERSION=gh ARCH=${{matrix.arch}} OS=${{matrix.os}} make containerized_integration
podman save -o ${{ env.IMAGE_NAME_INTEGRATION }}-${{matrix.os}}-${{matrix.arch}}.tar \
quay.io/crcont/${{ env.IMAGE_NAME_INTEGRATION}}:gh-${{matrix.os}}-${{matrix.arch}}
- name: Upload e2e ${{matrix.os}}-${{matrix.arch}}
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_NAME_E2E }}-${{matrix.os}}-${{matrix.arch}}
path: ${{ env.IMAGE_NAME_E2E }}-${{matrix.os}}-${{matrix.arch}}.tar
- name: Upload integration ${{matrix.os}}-${{matrix.arch}}
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_NAME_INTEGRATION }}-${{matrix.os}}-${{matrix.arch}}
path: ${{ env.IMAGE_NAME_INTEGRATION }}-${{matrix.os}}-${{matrix.arch}}.tar
- name: Log in to Quay.io
if: github.event_name == 'push'
uses: redhat-actions/podman-login@v1
with:
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_PASSWORD }}
registry: quay.io
- name: Push image to quay
if: github.event_name == 'push'
run: |
podman tag quay.io/crcont/${{ env.IMAGE_NAME_INTEGRATION}}:gh-${{matrix.os}}-${{matrix.arch}} quay.io/crcont/${{ env.IMAGE_NAME_INTEGRATION}}:vnext-${{matrix.os}}-${{matrix.arch}}
podman push quay.io/crcont/${{ env.IMAGE_NAME_INTEGRATION}}:vnext-${{matrix.os}}-${{matrix.arch}}
podman tag quay.io/crcont/${{ env.IMAGE_NAME_E2E}}:gh-${{matrix.os}}-${{matrix.arch}} quay.io/crcont/${{ env.IMAGE_NAME_E2E}}:vnext-${{matrix.os}}-${{matrix.arch}}
podman push quay.io/crcont/${{ env.IMAGE_NAME_E2E}}:vnext-${{matrix.os}}-${{matrix.arch}}
save-gh-context:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Save the GH context in an artifact
env:
GH_CONTEXT: ${{ toJSON(github) }}
run: echo $GH_CONTEXT > gh_context.json
- name: Upload the GH context artifact
uses: actions/upload-artifact@v4
with:
name: gh-context
path: gh_context.json