mirror of
https://github.com/bitdefender/bddisasm.git
synced 2024-11-22 07:28:07 +00:00
ci: Use a matrix for all the CMake configs
This commit is contained in:
parent
ea78026087
commit
8c1bc973d3
60
.github/workflows/ci.yml
vendored
60
.github/workflows/ci.yml
vendored
@ -7,8 +7,6 @@ on:
|
|||||||
- '*.md'
|
- '*.md'
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'isagenerator/**'
|
- 'isagenerator/**'
|
||||||
- 'bddisasm_test/**'
|
|
||||||
- 'bdshemu_test/**'
|
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
@ -16,8 +14,6 @@ on:
|
|||||||
- '*.md'
|
- '*.md'
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'isagenerator/**'
|
- 'isagenerator/**'
|
||||||
- 'bddisasm_test/**'
|
|
||||||
- 'bdshemu_test/**'
|
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
@ -28,6 +24,10 @@ jobs:
|
|||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
preset: ["debug-sanitizers", "no-mnemonic", "release"]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
attestations: write
|
attestations: write
|
||||||
id-token: write
|
id-token: write
|
||||||
@ -35,57 +35,41 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build with sanitizers
|
- name: Configure CMake
|
||||||
run: |
|
run: cmake --preset ${{ matrix.preset }} -DCMAKE_INSTALL_PREFIX=/usr
|
||||||
mkdir build_sanitizers
|
- name: Build
|
||||||
cd build_sanitizers
|
run: make -f ./build/${{ matrix.preset }} -j$(nproc)
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBDD_ASAN=ON -DBDD_UBSAN=ON
|
|
||||||
make -j$(nproc)
|
|
||||||
cd -
|
|
||||||
- name: Test bddisasm
|
- 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
|
- name: Test bdshemu
|
||||||
run: python3 ./tests/main.py --disasm ./build_sanitizers/disasmtool/disasmtool --conf ./bdshemu_test/conf-x86.json
|
run: python3 ./tests/main.py --disasm ./build/${{ matrix.preset }}/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 -
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: |
|
if: ${{ matrix.preset == 'release' }}
|
||||||
cd build
|
run: make -f ./build/${{ matrix.preset }} install
|
||||||
sudo make install
|
- name: Build pybddisasm
|
||||||
cd -
|
if: ${{ matrix.preset == 'release' }}
|
||||||
- name: Install setuptools
|
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
python3 -m pip install setuptools
|
python3 -m pip install setuptools
|
||||||
- name: Build pybddisasm
|
|
||||||
run: |
|
|
||||||
cd bindings/pybddisasm
|
cd bindings/pybddisasm
|
||||||
python3 setup.py build
|
python3 setup.py build
|
||||||
cd -
|
cd -
|
||||||
- name: Create package
|
- name: Create package
|
||||||
if: ${{ github.event_name == 'release' }}
|
if: ${{ github.event_name == 'release' && matrix.preset == 'release' }}
|
||||||
run: |
|
run: make -f ./build/${{ matrix.preset }} package
|
||||||
cd build
|
|
||||||
sudo make package
|
|
||||||
cd -
|
|
||||||
- name: Attest Build Provenance
|
- name: Attest Build Provenance
|
||||||
if: ${{ github.event_name == 'release' }}
|
if: ${{ github.event_name == 'release' && matrix.preset == 'release' }}
|
||||||
uses: actions/attest-build-provenance@v1.1.0
|
uses: actions/attest-build-provenance@v1.1.0
|
||||||
with:
|
with:
|
||||||
subject-path: |
|
subject-path: |
|
||||||
build/disasmtool/disasmtool
|
build/release/disasmtool/disasmtool
|
||||||
build/*.a
|
build/release/*.a
|
||||||
build/*.deb
|
build/release/*.deb
|
||||||
- name: Release
|
- name: Release
|
||||||
if: ${{ github.event_name == 'release' }}
|
if: ${{ github.event_name == 'release' && matrix.preset == 'release' }}
|
||||||
uses: AButler/upload-release-assets@v3.0
|
uses: AButler/upload-release-assets@v3.0
|
||||||
with:
|
with:
|
||||||
files: 'build/*.deb'
|
files: 'build/release/*.deb'
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
Windows-msbuild:
|
Windows-msbuild:
|
||||||
|
Loading…
Reference in New Issue
Block a user