forked from bitdefender/bddisasm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Use a matrix for all the CMake configs
- Loading branch information
1 parent
ea78026
commit 8c1bc97
Showing
1 changed file
with
22 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,17 +7,13 @@ on: | |
- '*.md' | ||
- 'docs/**' | ||
- 'isagenerator/**' | ||
- 'bddisasm_test/**' | ||
- 'bdshemu_test/**' | ||
- 'LICENSE' | ||
pull_request: | ||
branches: [ master ] | ||
paths-ignore: | ||
- '*.md' | ||
- 'docs/**' | ||
- 'isagenerator/**' | ||
- 'bddisasm_test/**' | ||
- 'bdshemu_test/**' | ||
- 'LICENSE' | ||
release: | ||
types: [published] | ||
|
@@ -28,64 +24,52 @@ jobs: | |
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
preset: ["debug-sanitizers", "no-mnemonic", "release"] | ||
|
||
permissions: | ||
attestations: write | ||
id-token: write | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build with sanitizers | ||
run: | | ||
mkdir build_sanitizers | ||
cd build_sanitizers | ||
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBDD_ASAN=ON -DBDD_UBSAN=ON | ||
make -j$(nproc) | ||
cd - | ||
- name: Configure CMake | ||
run: cmake --preset ${{ matrix.preset }} -DCMAKE_INSTALL_PREFIX=/usr | ||
- name: Build | ||
run: make -f ./build/${{ matrix.preset }} -j$(nproc) | ||
- name: Test bddisasm | ||
run: python3 ./tests/main.py --disasm ./build_sanitizers/disasmtool/disasmtool --conf ./bddisasm_test/conf-x86.json | ||
run: python3 ./tests/main.py --disasm ./build/${{ matrix.preset }}/disasmtool/disasmtool --conf ./bddisasm_test/conf-x86.json | ||
- name: Test bdshemu | ||
run: python3 ./tests/main.py --disasm ./build_sanitizers/disasmtool/disasmtool --conf ./bdshemu_test/conf-x86.json | ||
- name: Build all | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr | ||
make -j$(nproc) | ||
cd - | ||
run: python3 ./tests/main.py --disasm ./build/${{ matrix.preset }}/disasmtool/disasmtool --conf ./bdshemu_test/conf-x86.json | ||
- name: Install | ||
run: | | ||
cd build | ||
sudo make install | ||
cd - | ||
- name: Install setuptools | ||
if: ${{ matrix.preset == 'release' }} | ||
run: make -f ./build/${{ matrix.preset }} install | ||
- name: Build pybddisasm | ||
if: ${{ matrix.preset == 'release' }} | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install setuptools | ||
- name: Build pybddisasm | ||
run: | | ||
cd bindings/pybddisasm | ||
python3 setup.py build | ||
cd - | ||
- name: Create package | ||
if: ${{ github.event_name == 'release' }} | ||
run: | | ||
cd build | ||
sudo make package | ||
cd - | ||
if: ${{ github.event_name == 'release' && matrix.preset == 'release' }} | ||
run: make -f ./build/${{ matrix.preset }} package | ||
- name: Attest Build Provenance | ||
if: ${{ github.event_name == 'release' }} | ||
if: ${{ github.event_name == 'release' && matrix.preset == 'release' }} | ||
uses: actions/[email protected] | ||
with: | ||
subject-path: | | ||
build/disasmtool/disasmtool | ||
build/*.a | ||
build/*.deb | ||
build/release/disasmtool/disasmtool | ||
build/release/*.a | ||
build/release/*.deb | ||
- name: Release | ||
if: ${{ github.event_name == 'release' }} | ||
if: ${{ github.event_name == 'release' && matrix.preset == 'release' }} | ||
uses: AButler/[email protected] | ||
with: | ||
files: 'build/*.deb' | ||
files: 'build/release/*.deb' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
Windows-msbuild: | ||
|