Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .github/matrix_includes_packchk.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,42 @@
"runs_on":"macos-13",
"target":"darwin",
"arch": "amd64",
"runOn": "publicRepo"
"runOn": "publicRepo",
"binary": "packchk"
},
{
"runs_on":"macos-14",
"target":"darwin",
"arch": "arm64",
"runOn": "publicRepo"
"runOn": "publicRepo",
"binary": "packchk"
},
{
"runs_on":"ubuntu-22.04",
"target":"linux",
"arch": "amd64",
"runOn": "always"
"runOn": "always",
"binary": "packchk"
},
{
"runs_on":"ubuntu-22.04",
"target":"linux",
"arch": "arm64",
"runOn": "always"
"runOn": "always",
"binary": "packchk"
},
{
"runs_on":"windows-2019",
"target":"windows",
"arch": "amd64",
"runOn": "always"
"runOn": "always",
"binary": "packchk.exe"
},
{
"runs_on":"windows-2019",
"target":"windows",
"arch": "arm64",
"runOn": "always"
"runOn": "always",
"binary": "packchk.exe"
}
]
18 changes: 12 additions & 6 deletions .github/matrix_includes_svdconv.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,42 @@
"runs_on":"macos-13",
"target":"darwin",
"arch": "amd64",
"runOn": "publicRepo"
"runOn": "publicRepo",
"binary": "svdconv"
},
{
"runs_on":"macos-14",
"target":"darwin",
"arch": "arm64",
"runOn": "publicRepo"
"runOn": "publicRepo",
"binary": "svdconv"
},
{
"runs_on":"ubuntu-22.04",
"target":"linux",
"arch": "amd64",
"runOn": "always"
"runOn": "always",
"binary": "svdconv"
},
{
"runs_on":"ubuntu-22.04",
"target":"linux",
"arch": "arm64",
"runOn": "always"
"runOn": "always",
"binary": "svdconv"
},
{
"runs_on":"windows-2019",
"target":"windows",
"arch": "amd64",
"runOn": "always"
"runOn": "always",
"binary": "svdconv.exe"
},
{
"runs_on":"windows-2019",
"target":"windows",
"arch": "arm64",
"runOn": "always"
"runOn": "always",
"binary": "svdconv.exe"
}
]
9 changes: 9 additions & 0 deletions .github/workflows/buildmgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ jobs:
target: cbuildgen
arch: ${{ matrix.arch }}

- name: Strip projmgr release binary
if: |
github.event_name == 'release' &&
(startsWith(matrix.runs_on, 'macos') || startsWith(matrix.runs_on, 'ubuntu'))
run: |
binary_path="./build/tools/buildmgr/cbuildgen/${{ matrix.target }}-${{ matrix.arch }}/Release/cbuildgen${{ matrix.binary_extension }}"
echo "Stripping binary at: $binary_path"
strip "$binary_path"

- name: Archive cbuildgen
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
Expand Down
45 changes: 43 additions & 2 deletions .github/workflows/packchk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,48 @@ jobs:
retention-days: ${{ needs.setup.outputs.retention_days }}
if-no-files-found: error

- name: Install strip tools
if: |
github.event_name == 'release' &&
matrix.arch == 'arm64' &&
startsWith(matrix.runs_on, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install binutils-aarch64-linux-gnu

# Run only for release events on macOS or Ubuntu runners
- name: Strip and bundle packchk release binary
if: |
github.event_name == 'release' &&
(startsWith(matrix.runs_on, 'macos') || startsWith(matrix.runs_on, 'ubuntu'))
shell: bash
working-directory: build/tools/packchk/
run: |
mkdir -p packchk_release_bin

# Extract the binary tarball into the release directory
tar -xvf packchk-*-${{ matrix.target }}-${{ matrix.arch }}.tbz2 -C packchk_release_bin

# Construct the path to the extracted binary
binary_path="./packchk_release_bin/${{ matrix.binary }}"
echo "Stripping binary at: $binary_path"

# Use appropriate strip tool based on architecture and target
if [[ "${{ matrix.arch }}" == "arm64" && "${{ matrix.target }}" == "linux" ]]; then
aarch64-linux-gnu-strip "$binary_path"
else
strip "$binary_path"
fi

# Temporarily rename the original archive
original_filename=$(find . -maxdepth 1 -type f -name "packchk-*-${{ matrix.target }}-${{ matrix.arch }}.tbz2" | head -n 1)
mv "$original_filename" ./temp.tbz2

# Repack the modified binary into a new tarball
output_name=$(basename "$original_filename")
echo "Repacking into: $output_name"
tar -cjf "$output_name" -C packchk_release_bin .

- name: Attach zipped binary to the release
if: ${{ github.event_name == 'release' }}
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
Expand Down Expand Up @@ -185,8 +227,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install \
lcov
sudo apt-get install lcov

- name: Checkout devtools
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/packgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ jobs:
target: packgen
arch: ${{ matrix.arch }}

- name: Strip packgen release binary
if: |
github.event_name == 'release' &&
(startsWith(matrix.runs_on, 'macos') || startsWith(matrix.runs_on, 'ubuntu'))
run: |
binary_path="./build/tools/packgen/${{ matrix.target }}-${{ matrix.arch }}/Release/${{ matrix.binary }}"
echo "Stripping binary at: $binary_path"
strip "$binary_path"

- name: Archive packgen
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/projmgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ jobs:
target: projmgr
arch: ${{ matrix.arch }}

- name: Strip projmgr release binary
if: |
github.event_name == 'release' &&
(startsWith(matrix.runs_on, 'macos') || startsWith(matrix.runs_on, 'ubuntu'))
run: |
binary_path="./build/tools/projmgr/${{ matrix.target }}-${{ matrix.arch }}/Release/${{ matrix.binary }}"
echo "Stripping binary at: $binary_path"
strip "$binary_path"

- name: Archive projmgr
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/svdconv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,47 @@ jobs:
retention-days: ${{ needs.setup.outputs.retention_days }}
if-no-files-found: error

- name: Install strip tools
if: |
github.event_name == 'release' &&
matrix.arch == 'arm64' &&
startsWith(matrix.runs_on, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install binutils-aarch64-linux-gnu

# Run only for release events on macOS or Ubuntu runners
- name: Strip and bundle svdconv release binary
if: |
github.event_name == 'release' &&
(startsWith(matrix.runs_on, 'macos') || startsWith(matrix.runs_on, 'ubuntu'))
working-directory: build/tools/svdconv/SVDConv
run: |
mkdir -p svdconv_release_bin

# Extract the binary tarball into the release directory
tar -xvf svdconv-*-${{ matrix.target }}-${{ matrix.arch }}.tbz2 -C svdconv_release_bin

# Construct the path to the extracted binary
binary_path="./svdconv_release_bin/${{ matrix.binary }}"
echo "Stripping binary at: $binary_path"

# Use appropriate strip tool based on architecture and target
if [[ "${{ matrix.arch }}" == "arm64" && "${{ matrix.target }}" == "linux" ]]; then
aarch64-linux-gnu-strip "$binary_path"
else
strip "$binary_path"
fi

# Temporarily rename the original archive
original_filename=$(find . -maxdepth 1 -type f -name "svdconv-*-${{ matrix.target }}-${{ matrix.arch }}.tbz2" | head -n 1)
mv "$original_filename" ./temp.tbz2

# Repack the modified binary into a new tarball
output_name=$(basename "$original_filename")
echo "Repacking into: $output_name"
tar -cjf "$output_name" -C svdconv_release_bin .

- name: Attach svdconv binary to release
if: ${{ github.event_name == 'release' }}
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
Expand Down
Loading