Skip to content

Fix ut32 cast UB

Fix ut32 cast UB #146

Workflow file for this run

name: CI
on:
push:
branches: [ ]
permissions:
contents: write
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y meson ninja-build
- name: Build
run: make
- uses: actions/upload-artifact@v6
with:
name: build-linux
path: otezip
- name: Run tests
run: make test
- name: Run asan tests
run: make test2
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: brew install meson ninja
- name: Build
run: make
- name: Run tests
run: make -C test
- uses: actions/upload-artifact@v6
with:
name: build-macos
path: otezip
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install meson ninja
- name: Build
run: |
meson setup build --backend=ninja
ninja -C build
- uses: actions/upload-artifact@v6
with:
name: build-windows
path: build/otezip.exe
test-make:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- name: Install dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y meson ninja-build
- name: Install dependencies (macOS)
if: matrix.os == 'macos-latest'
run: brew install meson ninja
- name: Install dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
python -m pip install --upgrade pip
pip install meson ninja
- name: Test make build
if: matrix.os != 'windows-latest'
run: |
make clean
make
ls -la otezip
./otezip --help
- name: Test meson build (Windows)
if: matrix.os == 'windows-latest'
run: |
meson setup build --backend=ninja
ninja -C build
copy build\otezip.exe otezip.exe
dir otezip.exe
.\otezip.exe --help
check_release:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
outputs:
is_release: ${{ steps.release.outputs.is }}
tag_name: ${{ steps.release.outputs.tag }}
needs:
- build-linux
- build-macos
- build-windows
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0 # Download all git history and tags
- name: Check if is a release
run: git describe --exact-match --tags ${{ github.sha }} | awk 'BEGIN{tag="-";r="no"}/^[0-9]+\.[0-9]+/{tag=$0;r="yes"};END{print "::set-output name=is::"r;print "::set-output name=tag::"tag}'
id: release
release:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.check_release.outputs.is_release == 'yes' }}
needs:
- check_release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0 # Download all git history and tags
- name: Download artifacts
uses: actions/download-artifact@v7
with:
path: dist/artifacts
- name: Prepare release files
run: |
mkdir -p dist/release
cp dist/artifacts/build-linux/otezip dist/release/otezip-linux
cp dist/artifacts/build-macos/otezip dist/release/otezip-macos
cp dist/artifacts/build-windows/otezip.exe dist/release/otezip-windows.exe
- name: Create GitHub release
uses: softprops/action-gh-release@v2.5.0
with:
name: ${{ needs.check_release.outputs.tag_name }}
tag_name: ${{ needs.check_release.outputs.tag_name }}
body: |
Release ${{ needs.check_release.outputs.tag_name }}
draft: false
prerelease: false
generate_release_notes: true
files: |
dist/release/*