-
Notifications
You must be signed in to change notification settings - Fork 18
632 lines (545 loc) · 22.9 KB
/
ci.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
---
name: Build And Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
CFE_URL: "https://releases.llvm.org/5.0.2/cfe-5.0.2.src.tar.xz"
LLD_URL: "https://releases.llvm.org/5.0.2/lld-5.0.2.src.tar.xz"
LLVM_SRC_URL: "https://releases.llvm.org/5.0.2/llvm-5.0.2.src.tar.xz"
MAKE_SRC_URL: "https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz"
RUSTUP_INIT_URL: "https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init"
CMAKE_URL: "https://github.com/Kitware/CMake/releases/download/v3.28.0-rc5/cmake-3.28.0-rc5-linux-x86_64.tar.gz"
PUBLIC_SIMICS_PKGS_URL_WINDOWS: "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ead79ef5-28b5-48c7-8d1f-3cde7760798f/simics-6-packages-2024-05-win64.ispm"
# NOTE: We use the old ISPM because there is something wrong with 1.8.3 with unattended installation
# PUBLIC_SIMICS_ISPM_URL_WINDOWS: "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/881ee76a-c24d-41c0-af13-5d89b2a857ff/intel-simics-package-manager-1.7.5-win64.exe"
PUBLIC_SIMICS_ISPM_URL_WINDOWS: "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ead79ef5-28b5-48c7-8d1f-3cde7760798f/intel-simics-package-manager-1.8.3-win64.exe"
PUBLIC_SIMICS_PKGS_URL: "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ead79ef5-28b5-48c7-8d1f-3cde7760798f/simics-6-packages-2024-05-linux64.ispm"
PUBLIC_SIMICS_ISPM_URL: "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ead79ef5-28b5-48c7-8d1f-3cde7760798f/intel-simics-package-manager-1.8.3-linux64.tar.gz"
PUBLIC_SIMICS_PACKAGE_VERSION_1000: "6.0.185"
PUBLIC_SIMICS_ISPM_VERSION: "1.8.3"
BUILDER_LLD_VERSION: "5.0.2"
BUILDER_CFE_VERSION: "5.0.2"
BUILDER_LLVM_VERSION: "5.0.2"
BUILDER_MAKE_VERSION: "4.4.1"
BUILDER_CMAKE_VERSION: "3.28.0-rc5"
MINGW_URL: "https://github.com/brechtsanders/winlibs_mingw/releases/download/13.2.0-16.0.6-11.0.0-ucrt-r1/winlibs-x86_64-posix-seh-gcc-13.2.0-llvm-16.0.6-mingw-w64ucrt-11.0.0-r1.7z"
MINGW_VERSION: "13.2.0-16.0.6-11.0.0-ucrt-r1"
jobs:
cache_craff:
runs-on: ubuntu-latest
steps:
- name: Add ISPM to PATH
run: |
echo "${HOME}/simics/ispm/" >> "${GITHUB_PATH}"
- name: Install Dependencies
run: |
sudo apt-get -y update && \
sudo apt-get -y install \
clang libclang-dev cmake curl dosfstools g++ gcc git llvm make \
mtools ninja-build openssl libssl-dev python3 python3-pip
- name: Cache SIMICS Dependencies
id: cache-simics-packages
uses: actions/cache@v4
with:
path: "${HOME}/simics"
key: simics-linux-${{ env.PUBLIC_SIMICS_PACKAGE_VERSION_1000 }}-${{ env.PUBLIC_SIMICS_ISPM_VERSION }}
- name: Install SIMICS (External)
if: ${{ steps.cache-simics-packages.outputs.cache-hit != 'true' }}
run: |
mkdir -p "${HOME}/simics/ispm/" && \
curl --noproxy -L -o "${HOME}/simics/ispm.tar.gz" \
"${{ env.PUBLIC_SIMICS_ISPM_URL }}" && \
curl --noproxy -L -o "${HOME}/simics/simics.ispm" \
"${{ env.PUBLIC_SIMICS_PKGS_URL }}" && \
tar -C "${HOME}/simics/ispm" --strip-components=1 \
-xvf "${HOME}/simics/ispm.tar.gz"
- name: Set up SIMICS Install Directory
run: |
ispm settings install-dir "${HOME}/simics"
- name: Install SIMICS Packages
if: ${{ steps.cache-simics-packages.outputs.cache-hit != 'true' }}
run: |
ispm packages --install-bundle "${HOME}/simics/simics.ispm" \
--non-interactive --trust-insecure-packages
- name: Copy CRAFF Utilities
run: |
mkdir bin && \
cp "${HOME}/simics/simics-${{ env.PUBLIC_SIMICS_PACKAGE_VERSION_1000 }}/linux64/bin/craff" bin/craff && \
cp "${HOME}/simics/simics-${{ env.PUBLIC_SIMICS_PACKAGE_VERSION_1000 }}/linux64/bin/craff-fs" bin/craff-fs
- name: Upload Test Artifacts
uses: actions/upload-artifact@v4
with:
name: craff-${{ env.PUBLIC_SIMICS_PACKAGE_VERSION_1000 }}
path: bin/
build_test_artifacts_riscv_64:
name: Build Test Artifacts (RISCV-64)
runs-on: ubuntu-latest
needs: cache_craff
steps:
- name: Install Dependencies
run: |
sudo apt-get -y update && \
sudo apt-get -y install \
clang libclang-dev cmake curl dosfstools g++ gcc git llvm make \
mtools ninja-build openssl libssl-dev python3 python3-pip lld
- uses: actions/checkout@v4
with:
lfs: true
- name: Download Craff
uses: actions/download-artifact@v4
with:
name: craff-${{ env.PUBLIC_SIMICS_PACKAGE_VERSION_1000 }}
path: bin/
- name: Make Craff Executable
run: |
chmod 755 bin/*
chmod +x bin/*
- name: Cache Test Artifacts
id: cache-test-artifacts-riscv-64
uses: actions/cache@v4
with:
path: tests/rsrc/riscv-64/
key: cache-test-artifacts-${{ hashFiles('tests/rsrc/riscv-64/**/*') }}
- name: Build Test Artifacts
if: ${{ steps.cache-test-artifacts-riscv-64.outputs.cache-hit != 'true' }}
run: |
cd tests/rsrc/riscv-64
./build.sh
- name: Upload Test Artifacts
uses: actions/upload-artifact@v4
with:
name: test-artifacts-riscv-64
path: tests/rsrc/riscv-64
build_test_artifacts_x86_64_breakpoint_uefi_edk2:
name: Build Test Artifacts (x86_64 Breakpoints UEFI EDK2)
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt-get -y update && \
sudo apt-get -y install \
clang libclang-dev cmake curl dosfstools g++ gcc git llvm make \
mtools ninja-build openssl libssl-dev python3 python3-pip lld
- uses: actions/checkout@v4
with:
lfs: true
- name: Cache Test Artifacts
id: cache-test-artifacts-x86_64-breakpoint-uefi-edk2
uses: actions/cache@v4
with:
path: tests/rsrc/x86_64-breakpoint-uefi-edk2
key: cache-test-artifacts-${{ hashFiles('tests/rsrc/x86_64-breakpoint-uefi-edk2/**/*') }}
- name: Build Test Artifacts
if: ${{ steps.cache-test-artifacts-x86_64-breakpoint-uefi-edk2.outputs.cache-hit != 'true' }}
run: |
cd tests/rsrc/x86_64-breakpoint-uefi-edk2
./build.sh
- name: Upload Test Artifacts
uses: actions/upload-artifact@v4
with:
name: test-artifacts-x86_64-breakpoint-uefi-edk2
path: tests/rsrc/x86_64-breakpoint-uefi-edk2
build_test_artifacts_x86_64_crash-uefi:
name: Build Test Artifacts (x86_64 Crash UEFI)
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt-get -y update && \
sudo apt-get -y install \
clang libclang-dev cmake curl dosfstools g++ gcc git llvm make \
mtools ninja-build openssl libssl-dev python3 python3-pip lld
- uses: actions/checkout@v4
with:
lfs: true
- name: Cache Test Artifacts
id: cache-test-artifacts-x86_64-crash-uefi
uses: actions/cache@v4
with:
path: tests/rsrc/x86_64-crash-uefi
key: cache-test-artifacts-${{ hashFiles('tests/rsrc/x86_64-crash-uefi/**/*') }}
- name: Build Test Artifacts
if: ${{ steps.cache-test-artifacts-x86_64-crash-uefi.outputs.cache-hit != 'true' }}
run: |
cd tests/rsrc/x86_64-crash-uefi
./build.sh
- name: Upload Test Artifacts
uses: actions/upload-artifact@v4
with:
name: test-artifacts-x86_64-crash-uefi
path: tests/rsrc/x86_64-crash-uefi
build_test_artifacts_x86_64_timeout_uefi_edk2:
name: Build Test Artifacts (x86_64 Timeout UEFI EDK2)
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt-get -y update && \
sudo apt-get -y install \
clang libclang-dev cmake curl dosfstools g++ gcc git llvm make \
mtools ninja-build openssl libssl-dev python3 python3-pip lld
- uses: actions/checkout@v4
with:
lfs: true
- name: Cache Test Artifacts
id: cache-test-artifacts-x86_64-timeout-uefi-edk2
uses: actions/cache@v4
with:
path: tests/rsrc/x86_64-timeout-uefi-edk2
key: cache-test-artifacts-${{ hashFiles('tests/rsrc/x86_64-timeout-uefi-edk2/**/*') }}
- name: Build Test Artifacts
if: ${{ steps.cache-test-artifacts-x86_64-timeout-uefi-edk2.outputs.cache-hit != 'true' }}
run: |
cd tests/rsrc/x86_64-timeout-uefi-edk2
./build.sh
- name: Upload Test Artifacts
uses: actions/upload-artifact@v4
with:
name: test-artifacts-x86_64-timeout-uefi-edk2
path: tests/rsrc/x86_64-timeout-uefi-edk2
build_test_artifacts_x86_64_uefi:
name: Build Test Artifacts (x86_64 UEFI)
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt-get -y update && \
sudo apt-get -y install \
clang libclang-dev cmake curl dosfstools g++ gcc git llvm make \
mtools ninja-build openssl libssl-dev python3 python3-pip lld
- uses: actions/checkout@v4
with:
lfs: true
- name: Cache Test Artifacts
id: cache-test-artifacts-x86_64-uefi
uses: actions/cache@v4
with:
path: tests/rsrc/x86_64-uefi
key: cache-test-artifacts-${{ hashFiles('tests/rsrc/x86_64-uefi/**/*') }}
- name: Build Test Artifacts
if: ${{ steps.cache-test-artifacts-x86_64-uefi.outputs.cache-hit != 'true' }}
run: |
cd tests/rsrc/x86_64-uefi
./build.sh
- name: Upload Test Artifacts
uses: actions/upload-artifact@v4
with:
name: test-artifacts-x86_64-uefi
path: tests/rsrc/x86_64-uefi
build_test_artifacts_x86_64_uefi_edk2:
name: Build Test Artifacts (x86_64 UEFI EDK2)
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt-get -y update && \
sudo apt-get -y install \
clang libclang-dev cmake curl dosfstools g++ gcc git llvm make \
mtools ninja-build openssl libssl-dev python3 python3-pip lld
- uses: actions/checkout@v4
with:
lfs: true
- name: Cache Test Artifacts
id: cache-test-artifacts-x86_64-uefi-edk2
uses: actions/cache@v4
with:
path: tests/rsrc/x86_64-uefi-edk2
key: cache-test-artifacts-${{ hashFiles('tests/rsrc/x86_64-uefi-edk2/**/*') }}
- name: Build Test Artifacts
if: ${{ steps.cache-test-artifacts-x86_64-uefi-edk2.outputs.cache-hit != 'true' }}
run: |
cd tests/rsrc/x86_64-uefi-edk2
./build.sh
- name: Upload Test Artifacts
uses: actions/upload-artifact@v4
with:
name: test-artifacts-x86_64-uefi-edk2
path: tests/rsrc/x86_64-uefi-edk2
build_test_artifacts_x86_user:
name: Build Test Artifacts (x86)
runs-on: ubuntu-latest
needs: cache_craff
steps:
- name: Install Dependencies
run: |
sudo apt-get -y update && \
sudo apt-get -y install \
clang libclang-dev cmake curl dosfstools g++ gcc git llvm make \
mtools ninja-build openssl libssl-dev python3 python3-pip lld \
build-essential gcc-multilib
- uses: actions/checkout@v4
with:
lfs: true
- name: Download Craff
uses: actions/download-artifact@v4
with:
name: craff-${{ env.PUBLIC_SIMICS_PACKAGE_VERSION_1000 }}
path: bin/
- name: Make Craff Executable
run: |
chmod 755 bin/*
chmod +x bin/*
- name: Cache Test Artifacts
id: cache-test-artifacts-x86-user
uses: actions/cache@v4
with:
path: tests/rsrc/x86-user/
key: cache-test-artifacts-${{ hashFiles('tests/rsrc/x86-user/**/*') }}
- name: Build Test Artifacts
if: ${{ steps.cache-test-artifacts-x86-user.outputs.cache-hit != 'true' }}
run: |
cd tests/rsrc/x86-user
./build.sh
- name: Upload Test Artifacts
uses: actions/upload-artifact@v4
with:
name: test-artifacts-x86-user
path: tests/rsrc/x86-user
build_and_test:
name: Build and Test (Linux)
container: fedora:38
runs-on: ubuntu-latest
needs:
- build_test_artifacts_riscv_64
- build_test_artifacts_x86_64_breakpoint_uefi_edk2
- build_test_artifacts_x86_64_crash-uefi
- build_test_artifacts_x86_64_timeout_uefi_edk2
- build_test_artifacts_x86_64_uefi
- build_test_artifacts_x86_64_uefi_edk2
- build_test_artifacts_x86_user
steps:
- name: Add ISPM to PATH
run: |
echo "${HOME}/simics/ispm/" >> "${GITHUB_PATH}"
- name: Install Dependencies
run: |
dnf -y update && \
dnf -y install \
alsa-lib atk clang clang-libs clang-resource-filesystem \
clang-tools-extra cmake cups curl dosfstools g++ gcc git \
git-lfs glibc-devel glibc-devel.i686 glibc-static \
glibc-static.i686 gtk3 lld lld-devel lld-libs llvm llvm-libs \
llvm-static make mesa-libgbm mtools ninja-build openssl \
openssl-devel openssl-libs python3 python3-pip yamllint
- uses: actions/checkout@v4
with:
lfs: true
- name: Delete Un-Built Test Dependencies
run: |
rm -rf tests/rsrc/
- name: Download Test Artifacts (RISCV-64)
uses: actions/download-artifact@v4
with:
name: test-artifacts-riscv-64
path: tests/rsrc/riscv-64
- name: Download Test Artifacts (x86_64 Breakpoints UEFI EDK2)
uses: actions/download-artifact@v4
with:
name: test-artifacts-x86_64-breakpoint-uefi-edk2
path: tests/rsrc/x86_64-breakpoint-uefi-edk2
- name: Download Test Artifacts (x86_64 Timeout UEFI EDK2)
uses: actions/download-artifact@v4
with:
name: test-artifacts-x86_64-crash-uefi
path: tests/rsrc/x86_64-crash-uefi
- name: Download Test Artifacts (x86_64 Timeout UEFI EDK2)
uses: actions/download-artifact@v4
with:
name: test-artifacts-x86_64-timeout-uefi-edk2
path: tests/rsrc/x86_64-timeout-uefi-edk2
- name: Download Test Artifacts (x86_64 UEFI)
uses: actions/download-artifact@v4
with:
name: test-artifacts-x86_64-uefi
path: tests/rsrc/x86_64-uefi
- name: Download Test Artifacts (x86_64 UEFI EDK2)
uses: actions/download-artifact@v4
with:
name: test-artifacts-x86_64-uefi-edk2
path: tests/rsrc/x86_64-uefi-edk2
- name: Download Test Artifacts (x86)
uses: actions/download-artifact@v4
with:
name: test-artifacts-x86-user
path: tests/rsrc/x86-user
- name: Take Ownership of Test Dependencies
run: |
ls -lahR tests/rsrc/
chown -R "${USER}:${USER}" tests/rsrc/
chmod -R 0755 tests/rsrc/
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
components: rustfmt,clippy,miri
- name: Cache SIMICS Dependencies
id: cache-simics-packages
uses: actions/cache@v4
with:
path: ~/simics
key: simics-linux-${{ env.PUBLIC_SIMICS_PACKAGE_VERSION_1000 }}-${{ env.PUBLIC_SIMICS_ISPM_VERSION }}
- name: Install SIMICS (External)
if: ${{ steps.cache-simics-packages.outputs.cache-hit != 'true' }}
run: |
mkdir -p "${HOME}/simics/ispm/" && \
curl -L -o "${HOME}/simics/ispm.tar.gz" \
"${{ env.PUBLIC_SIMICS_ISPM_URL }}" && \
curl -L -o "${HOME}/simics/simics.ispm" \
"${{ env.PUBLIC_SIMICS_PKGS_URL }}" && \
tar -C "${HOME}/simics/ispm" --strip-components=1 \
-xvf "${HOME}/simics/ispm.tar.gz"
- name: Set up SIMICS Install Directory
run: |
ispm settings install-dir "${HOME}/simics"
- name: Install SIMICS Packages
if: ${{ steps.cache-simics-packages.outputs.cache-hit != 'true' }}
run: |
ispm packages --install-bundle "${HOME}/simics/simics.ispm" \
--non-interactive --trust-insecure-packages
- name: Install SIMICS Build
run: |
cargo install --path simics-rs/cargo-simics-build
- name: Build TSFFS Package
run: |
cargo simics-build -r
- name: CT39 - Clippy Check Project
run: |
cargo clippy \
|| ( echo "❗ [CT39 (1/2)] Failed clippy static analysis checks" && exit 1 )
echo "✅ [CT39 (1/2)] Passed clippy static analysis checks"
- name: Test Project
run: |
SIMICS_TEST_CLEANUP_EACH=1 SIMICS_TEST_LOCAL_PACKAGES_ONLY=1 cargo test --no-fail-fast -r _latest || ( echo "❗ Tests failed" && exit 1 )
echo "✅ Tests passed"
- name: Build Docs
run: |
cargo doc --workspace --no-deps
build_windows:
name: Build and Test (Windows)
runs-on: windows-latest
steps:
- name: Add ISPM and MinGW to PATH
run: |
set PATH $env:PATH
"C:\MinGW\bin" | Out-File -FilePath $env:GITHUB_PATH
"C:\ISPM\" | Out-File -FilePath $env:GITHUB_PATH -Append
"$PATH" | Out-File -FilePath $env:GITHUB_PATH -Append
echo "Current PATH: " $env:GITHUB_PATH
- name: Cache MinGW
id: cache-mingw
uses: actions/cache@v4
with:
path: C:\MinGW\
key: mingw-${{ env.MINGW_VERSION }}
- name: Download and Extract MinGW-w64
if: ${{ steps.cache-mingw.outputs.cache-hit != 'true' }}
run: |
$ProgressPreference = 'SilentlyContinue'
echo "Downloading MinGW"
Invoke-WebRequest -URI ${{ env.MINGW_URL }} -OutFile mingw.7z
echo "Downloaded MinGW. Extracting MinGW."
7z x mingw.7z -oC:\mingw-w64\
echo "Extracted MinGW."
mv C:\mingw-w64\mingw64\ C:\MinGW\
- name: Download and Install Rust
run: |
$ProgressPreference = 'SilentlyContinue'
echo "Downloading Rustup"
Invoke-WebRequest -URI https://win.rustup.rs/x86_64 -OutFile C:\rustup-init.exe
echo "Installing Rust"
C:\rustup-init.exe --default-toolchain nightly --default-host x86_64-pc-windows-gnu -y
- name: Cache SIMICS
id: cache-simics-packages-windows
uses: actions/cache@v4
with:
path: |
C:\ISPM\
C:\SIMICS\
key: simics-windows-${{ env.PUBLIC_SIMICS_PACKAGE_VERSION_1000 }}-${{ env.PUBLIC_SIMICS_ISPM_VERSION }}
# ispm-installer.exe is a NSIS installer for the elctron build. We want the
# default options, so we pass /S to install silently and /D to change directory.
# NOTE that the argument to /D must never contain quotes!:
# https://nsis.sourceforge.io/Docs/Chapter3.html#installerusage
#
# NOTE: We use | Out-Null on the installer command to make powershell wait for it
# to actually finish instead of forking it to the background
- name: Download and Install ISPM
shell: powershell
if: ${{ steps.cache-simics-packages-windows.outputs.cache-hit != 'true' }}
run: |
Invoke-WebRequest -URI ${{ env.PUBLIC_SIMICS_ISPM_URL_WINDOWS }} -OutFile C:\ispm-installer.exe
C:\ispm-installer.exe /S /D=C:\ISPM\ | Out-Null
- name: Set SIMICS Install Directory
run: |
ispm.exe settings install-dir C:\SIMICS\
- name: Download and Install SIMICS Packages
if: ${{ steps.cache-simics-packages-windows.outputs.cache-hit != 'true' }}
run: |
$ProgressPreference = 'SilentlyContinue'
echo "Downloading Simics 6 Packages"
Invoke-WebRequest -URI ${{ env.PUBLIC_SIMICS_PKGS_URL_WINDOWS }} -OutFile C:\simics-6-packages.ispm
echo "Installing ISPM packages"
ispm.exe packages --install-bundle C:\simics-6-packages.ispm --non-interactive --trust-insecure-packages
echo "Installed ISPM packages"
- uses: actions/checkout@v4
with:
lfs: true
- name: Setup, Build, and Install TSFFS
run: |
cargo install --path simics-rs/cargo-simics-build
cargo simics-build -r
- name: Upload Distribution Package
uses: actions/upload-artifact@v4
with:
name: simics-pkg-31337-win64
path: target/release/simics-pkg-31337-*-win64.ispm
build_dist:
name: Build for Distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Cache Builder Dependencies
id: cache-builder-dependencies
uses: actions/cache@v4
with:
path: .github/builder/rsrc
key: "cache-builder-dependencies-${{ env.PUBLIC_SIMICS_ISPM_VERSION }}-${{ env.BUILDER_LLD_VERSION }}-${{ env.BUILDER_CFE_VERSION }}-${{ env.BUILDER_LLVM_VERSION }}-${{ env.BUILDER_MAKE_VERSION }}-${{ env.BUILDER_CMAKE_VERSION }}"
- name: Download Builder Dependencies
if: ${{ steps.cache-builder-dependencies.outputs.cache-hit != 'true' }}
run: |
mkdir -p .github/builder/rsrc
curl -L -o .github/builder/rsrc/ispm.tar.gz \
"${{ env.PUBLIC_SIMICS_ISPM_URL }}" && \
curl -L -o .github/builder/rsrc/simics.ispm \
"${{ env.PUBLIC_SIMICS_PKGS_URL }}"
curl -L -o .github/builder/rsrc/cfe-5.0.2.src.tar.xz \
"${{ env.CFE_URL }}"
curl -L -o .github/builder/rsrc/lld-5.0.2.src.tar.xz \
"${{ env.LLD_URL }}"
curl -L -o .github/builder/rsrc/llvm-5.0.2.src.tar.xz \
"${{ env.LLVM_SRC_URL }}"
curl -L -o .github/builder/rsrc/make-4.4.1.tar.gz \
"${{ env.MAKE_SRC_URL }}"
curl -L -o .github/builder/rsrc/rustup-init \
"${{ env.RUSTUP_INIT_URL }}"
chmod +x .github/builder/rsrc/rustup-init
curl -L -o .github/builder/rsrc/cmake-3.28.0-rc5-linux-x86_64.tar.gz \
"${{ env.CMAKE_URL }}"
docker run -v "$(pwd)/.github/builder/rsrc/rpms:/rpms" fedora:20 bash -c \
'yum -y update && yum install --downloadonly --downloaddir=/rpms coreutils gcc gcc-c++ make which && chmod -R 755 /rpms/'
- name: Build Distribution Package
run: |
docker build -t tsffs-dist -f .github/builder/Dockerfile .
docker create --name tsffs-dist tsffs-dist bash
docker cp tsffs-dist:/packages .
docker rm -f tsffs-dist
- name: Upload Distribution Package
uses: actions/upload-artifact@v4
with:
name: simics-pkg-31337-linux64
path: packages/simics-pkg-31337-*-linux64.ispm