-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (128 loc) · 4.84 KB
/
job.fixed-envmap-example.yml
File metadata and controls
131 lines (128 loc) · 4.84 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
name: "build envmap example (w/ patched libs)"
# to access artifacts from the patched libs action
permissions:
contents: read
actions: read
"on":
workflow_dispatch:
jobs:
build-via-native-image:
name: "build envmap via native-image"
strategy:
fail-fast: true
matrix:
include:
- platform: ubuntu-24.04
arch: 'x86_64'
- platform: ubuntu-24.04-arm
arch: 'aarch64'
runs-on: ${{ matrix.platform }}
steps:
- name: "clone repo"
uses: actions/checkout@v4
- name: "download cosmocc"
uses: actions/download-artifact@v7
with:
run-id: 22571146042
name: cosmocc-f0d70c3dbc7ac7668e0ed9ff317c9710e26a7d3a
github-token: ${{ github.token }}
- name: "download labs JDK libs"
uses: actions/download-artifact@v7
with:
run-id: 22571146042
name: labs-${{ matrix.arch }}-libs-f0d70c3dbc7ac7668e0ed9ff317c9710e26a7d3a
github-token: ${{ github.token }}
- name: "download graal helper libs"
uses: actions/download-artifact@v7
with:
run-id: 22571146042
name: graal-${{ matrix.arch }}-libs-f0d70c3dbc7ac7668e0ed9ff317c9710e26a7d3a
github-token: ${{ github.token }}
- name: "build native image from source"
run: make ARCH=${{ matrix.arch }} build-native-image
- name: "setup downloaded artifacts"
run: ARCH=${{ matrix.arch }} bash scripts/download-partials-setup.sh
- name: "build envmap example"
run: make ARCH=${{ matrix.arch }} build-envmap-example
- name: "upload envmap example"
uses: actions/upload-artifact@v6
with:
name: envmap-${{ matrix.arch }}
overwrite: true
path: ./build/envmap.${{ matrix.arch }}
compression-level: 0
build-ape:
name: "build envmap APE"
needs: [build-via-native-image]
runs-on: ubuntu-24.04
steps:
- name: "clone repo"
uses: actions/checkout@v4
- name: "get cosmocc artifact"
uses: actions/download-artifact@v7
with:
run-id: 22571146042
name: cosmocc-f0d70c3dbc7ac7668e0ed9ff317c9710e26a7d3a
github-token: ${{ github.token }}
- name: "get x86_64 envmap artifact"
uses: actions/download-artifact@v7
with:
name: envmap-x86_64
- name: "get aarch64 envmap artifact"
uses: actions/download-artifact@v7
with:
name: envmap-aarch64
- name: "setup cosmocc"
run: |
mkdir -p testing/cosmopolitan
cd testing/cosmopolitan
unzip -qo ../../cosmocc.zip
cd ../../
- name: "build APE"
run: bash scripts/apelinkpls.sh envmap
- name: "upload envmap APE"
uses: actions/upload-artifact@v6
with:
name: envmap-APE
overwrite: true
path: ./envmap.com
compression-level: 0
test-ape:
name: "Test APE"
needs: [build-ape]
strategy:
fail-fast: false
matrix:
include:
- platform: ubuntu-24.04
type: 'nix'
- platform: ubuntu-24.04-arm
type: 'nix'
- platform: macos-15-intel
type: 'nix'
- platform: macos-15
type: 'nix'
- platform: windows-latest
type: 'win32'
runs-on: ${{ matrix.platform }}
steps:
- name: "Setup: Download Artifact"
uses: actions/download-artifact@v7
with:
name: envmap-APE
- name: "Run: envmap.com (*nix)"
if: matrix.type == 'nix'
shell: bash
run: chmod +x ./envmap.com && ./envmap.com
- name: "Run: envmap.com (win32)"
if: matrix.type == 'win32'
shell: pwsh
run: '& .\envmap.com'
- name: "Run: envmap.com --strace (*nix)"
if: matrix.type == 'nix' && (success() || failure())
shell: bash
run: ./envmap.com --strace --ftrace
- name: "Run: envmap.com --strace (win32)"
if: matrix.type == 'win32' && (success() || failure())
shell: pwsh
run: '& .\envmap.com --strace --ftrace'