-
-
Notifications
You must be signed in to change notification settings - Fork 70
99 lines (82 loc) · 2.73 KB
/
test_release.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
# Github Action to verify the releases build by the current repo / the workflow
# defined in build_release_template.yml.
name: test_release
on:
pull_request:
push:
jobs:
build_release:
name: "Default release build"
if: ${{ github.repository == 'dlang/installer' }}
uses: ./.github/workflows/build_release_template.yml
with:
# Use the same branch/tag, or the targeted branch for PRs
release_branch: ${{ github.base_ref || github.ref_name }}
# Empty = use the repository/branch that triggered the build
installer_repo:
installer_branch:
validate_build:
name: Validate results of build_release_template.yml
needs: build_release
strategy:
fail-fast: false
matrix:
include:
- host: windows-latest
os: windows
build: dmd.${{ github.base_ref || github.ref_name }}.windows.7z
- host: macos-latest
os: osx
build: dmd.${{ github.base_ref || github.ref_name }}.osx.tar.xz
- host: ubuntu-latest
os: linux
build: dmd.${{ github.base_ref || github.ref_name }}.linux.tar.xz
- host: macos-12
os: freebsd
build: dmd.${{ github.base_ref || github.ref_name }}.freebsd-64.tar.xz
runs-on: ${{ matrix.host }}
env:
OS: ${{ matrix.os }}
BUILD: ${{ matrix.build }}
steps:
- name: Download generated releases from the artifacts
id: download-release
uses: actions/download-artifact@v3
with:
name: dmd-release
- name: Clone installer repo
uses: actions/checkout@v3
with:
path: installer
- name: Check ${{ matrix.os }} artifacts
id: check
if: ${{ matrix.os != 'freebsd' }}
shell: bash
run: source ./installer/test/release/validate_release.sh
- name: Check ${{ matrix.os }} artifacts in a VM
if: ${{ matrix.os == 'freebsd' }}
uses: cross-platform-actions/[email protected]
with:
operating_system: freebsd
hypervisor: qemu
memory: 8G
version: '12.2'
environment_variables: OS BUILD
shell: bash
run: source ./installer/test/release/validate_release.sh
validate_build_metadata:
name: Validate outputs of build_release_template.yml
runs-on: ubuntu-latest
needs: build_release
# Revisions built above
env:
DMD_REF: ${{ needs.build_release.outputs.dmd-revision }}
PHOBOS_REF: ${{ needs.build_release.outputs.phobos-revision }}
steps:
- name: Check outputs
shell: bash
run: |
set -eux
# Check that revisions are set
[ "$DMD_REF" != "" ]
[ "$PHOBOS_REF" != "" ]