Skip to content

Commit 7762aa4

Browse files
committed
Update CI
1 parent c0e033e commit 7762aa4

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

.github/workflows/ReBarDxe.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ env:
1111

1212
jobs:
1313
rebardxe-windows:
14-
runs-on: windows-2019
14+
runs-on: windows-2025
1515

1616
env:
17-
TOOL_CHAIN_TAG: VS2019
17+
TOOL_CHAIN_TAG: VS2022
1818

1919
steps:
2020
- uses: actions/setup-python@v4.3.0
@@ -45,7 +45,7 @@ jobs:
4545
uses: actions/checkout@v3
4646
with:
4747
repository: 'tianocore/edk2'
48-
ref: 'edk2-stable202208'
48+
ref: 'edk2-stable202508'
4949
submodules: 'recursive'
5050

5151
- name: Download RebarUEFI
@@ -63,14 +63,14 @@ jobs:
6363
uses: actions/upload-artifact@master
6464
with:
6565
name: ReBarDxe (built on Windows)
66-
path: ${{github.workspace}}/Build/ReBarUEFI/RELEASE_VS2019/X64/ReBarDxe.ffs
66+
path: ${{github.workspace}}/Build/ReBarUEFI/RELEASE_VS2022/X64/ReBarDxe.ffs
6767

6868

6969
rebardxe-linux:
70-
runs-on: ubuntu-22.04
70+
runs-on: ubuntu-24.04
7171

7272
env:
73-
TOOL_CHAIN_TAG: GCC5
73+
TOOL_CHAIN_TAG: GCC
7474

7575
steps:
7676
- uses: actions/setup-python@v4.3.0
@@ -80,7 +80,7 @@ jobs:
8080
uses: actions/checkout@v3
8181
with:
8282
repository: 'tianocore/edk2'
83-
ref: 'edk2-stable202208'
83+
ref: 'edk2-stable202508'
8484
submodules: 'recursive'
8585
path: '.'
8686

@@ -90,7 +90,7 @@ jobs:
9090
path: './ReBarUEFI/'
9191

9292
- name: Install dependencies
93-
run: sudo apt install build-essential uuid-dev iasl git nasm python-is-python3
93+
run: sudo apt install build-essential uuid-dev iasl git nasm python-is-python3
9494

9595
- name: Build Base Tools
9696
run: make -C ./BaseTools/
@@ -105,4 +105,4 @@ jobs:
105105
uses: actions/upload-artifact@master
106106
with:
107107
name: ReBarDxe (built on Linux)
108-
path: ${{github.workspace}}/Build/ReBarUEFI/RELEASE_GCC5/X64/ReBarDxe.ffs
108+
path: ${{github.workspace}}/Build/ReBarUEFI/RELEASE_GCC/X64/ReBarDxe.ffs

ReBarDxe/buildffs.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,18 @@
1717
buildtype = "RELEASE"
1818

1919

20-
def filesub(filep, f, r):
20+
def target_update(filep, p, v):
2121
# Read in the file
2222
with open(filep, 'r') as file :
23-
filedata = file.read()
24-
25-
# Replace the target string
26-
filedata = filedata.replace(f, r)
23+
lines = file.read()
2724

2825
# Write the file out again
2926
with open(filep, 'w') as file:
30-
file.write(filedata)
27+
for i, l in enumerate(lines.splitlines()):
28+
if l.split('=')[0].strip() == p:
29+
file.write(f"{p} = {v}\n")
30+
else:
31+
file.write(f"{l.rstrip()}\n")
3132

3233
def set_bit(data, bit):
3334
"""Sets a specific bit."""
@@ -51,9 +52,9 @@ def set_nx_compat_flag(pe):
5152
print("TOOL_CHAIN_TAG: ", os.environ['TOOL_CHAIN_TAG'])
5253

5354
# setup Conf/target.txt
54-
filesub("./Conf/target.txt", "DEBUG", os.environ['TARGET'])
55-
filesub("./Conf/target.txt", "IA32", os.environ['TARGET_ARCH'])
56-
filesub("./Conf/target.txt", "VS2015x86", os.environ['TOOL_CHAIN_TAG'])
55+
target_update("./Conf/target.txt", "TARGET", os.environ['TARGET'])
56+
target_update("./Conf/target.txt", "TARGET_ARCH", os.environ['TARGET_ARCH'])
57+
target_update("./Conf/target.txt", "TOOL_CHAIN_TAG", os.environ['TOOL_CHAIN_TAG'])
5758
else:
5859
os.chdir("../..")
5960

0 commit comments

Comments
 (0)