envvar no longer needed on flatpak windows #519
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
name: iaito CI | |
env: | |
R2V: 5.8.8 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
acr-linux-r2git: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: false # 'recursive' 'true' or 'false' | |
persist-credentials: false | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8.x | |
- name: apt dependencies | |
run: | | |
sudo apt-get update | |
sudo apt install -y libgraphviz-dev mesa-common-dev ninja-build meson | |
sudo apt install -y libqt5svg5-dev qttools5-dev qttools5-dev-tools | |
sudo apt install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools | |
- name: install r2 | |
run: git clone --depth=1 https://github.com/radareorg/radare2 r2git && CFLAGS=-O0 r2git/sys/install.sh | |
- name: build iaito | |
run: | | |
./configure --prefix=/usr | |
make -j4 | |
- name: packaging | |
run: | | |
make -j -C dist/debian | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: iaito-amd64.deb | |
path: dist/debian/*/*.deb | |
acr-linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: false # 'recursive' 'true' or 'false' | |
persist-credentials: false | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8.x | |
- name: apt dependencies | |
run: | | |
sudo apt-get update | |
sudo apt install -y libgraphviz-dev mesa-common-dev ninja-build | |
sudo apt install -y libqt5svg5-dev qttools5-dev qttools5-dev-tools | |
sudo apt install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools | |
- name: install r2 | |
run: | | |
wget -q https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2_${{env.R2V}}_amd64.deb | |
wget -q https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2-dev_${{env.R2V}}_amd64.deb | |
sudo dpkg -i *.deb | |
- name: build iaito | |
run: | | |
./configure --prefix=/usr | |
make -j4 | |
- name: packaging | |
run: | | |
make -C dist/debian | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: iaito-amd64.deb | |
path: dist/debian/*/*.deb | |
acr-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: false # 'recursive' 'true' or 'false' | |
persist-credentials: false | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8.x | |
- name: homebrew dependencies | |
run: | | |
brew update | |
brew install pkg-config qt@5 | |
brew unlink qt@5 || true | |
brew link --force qt@5 | |
pip3 install meson | |
pip3 install ninja | |
- name: install r2 | |
run: | | |
wget -q https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2-x64-${{env.R2V}}.pkg | |
sudo installer -pkg *.pkg -target / | |
- name: build iaito | |
run: | | |
export PATH="/usr/local/opt/qt@5/bin:$PATH" | |
export PATH="/opt/homebrew/opt/qt@5/bin:$PATH" # doesnt seems to be necessary | |
export LDFLAGS="-L/usr/local/opt/qt@5/lib" | |
export CPPFLAGS="-I/usr/local/opt/qt@5/include" | |
export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig" | |
./configure | |
make -j4 | |
- name: packaging | |
run: | | |
make -C dist/macos | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: iaito-x64.dmg | |
path: dist/macos/iaito.dmg | |
meson: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, ubuntu-20.04] | |
python-version: [3.8.x] | |
system-deps: [true] | |
cc-override: [default] | |
cxx-override: [default] | |
# Prevent one job from pausing the rest | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: false # 'recursive' 'true' or 'false' | |
persist-credentials: false | |
- name: apt dependencies | |
if: contains(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install libgraphviz-dev mesa-common-dev | |
sudo apt-get install ninja-build make git patch wget | |
sudo apt install -y libqt5svg5-dev qttools5-dev qttools5-dev-tools | |
sudo apt install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools | |
- name: install r2 | |
run: git clone --depth=1 https://github.com/radareorg/radare2 r2git && CFLAGS=-O0 r2git/sys/install.sh | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: homebrew dependencies | |
if: contains(matrix.os, 'macos') | |
run: | | |
brew update --preinstall # temporary workaround for https://github.com/Homebrew/homebrew-bundle/issues/751 | |
brew install coreutils pkg-config | |
brew install pkg-config qt@5 | |
brew unlink qt@5 || true | |
brew link --force qt@5 | |
pip3 install meson | |
pip3 install ninja | |
- name: macos build | |
if: contains(matrix.os, 'macos') | |
run: | | |
cd src && meson ../build | |
cd ../build && ninja -j4 | |
- name: meson+ninja ubuntu | |
if: contains(matrix.os, 'ubuntu') | |
run: | | |
pip install meson | |
cd src && meson ../build | |
cd ../build && ninja -j4 | |
w64-meson: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: false | |
persist-credentials: false | |
- name: Preparing msvc toolchain | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
# - uses: actions/setup-python@v1 | |
# with: | |
# python-version: 3.8.x | |
# - name: Prepare Qt | |
# working-directory: build | |
# shell: cmd | |
# run: | | |
# curl -vLo qt-unified-windows-x86-online.exe http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe | |
# qt-unified-windows-x86-online.exe --verbose --script ..\ci\qt.qs | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
- name: dependencies | |
shell: cmd | |
run: | | |
pip install ninja meson wget | |
choco install zip | |
- name: install r2 | |
shell: bash | |
run: | | |
python -m wget https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2-${{env.R2V}}-w64.zip -o r2.zip | |
unzip r2.zip | |
mv radare2-${{env.R2V}}-w64 radare2 | |
pwd | |
- name: w64-make | |
shell: cmd | |
run: | | |
SET ARCH=x64 | |
set PATH=%CD%\r2_dist\bin;%PATH% | |
call preconfigure.bat | |
call configure.bat | |
call make.bat | |
zip -r iaito.zip iaito | |
dir /s | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: iaito.exe | |
path: iaito\iaito.exe | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: iaito.zip | |
path: iaito.zip | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.PACKAGE_NAME }} | |
path: build/${{ env.PACKAGE_NAME }} | |
check_release: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
outputs: | |
is_release: ${{ steps.release.outputs.is }} | |
tag_name: ${{ steps.release.outputs.tag }} | |
needs: | |
- acr-linux | |
- acr-macos | |
- w64-meson | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
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 "is="r;print "tag="tag}' >> ${GITHUB_OUTPUT} | |
id: release | |
release: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && needs.check_release.outputs.is_release == 'yes' }} | |
needs: | |
- check_release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Download all git history and tags | |
- name: Extract version | |
run: echo "string=`./configure -qV`" >> $GITHUB_OUTPUT | |
id: version | |
- name: Prepare release notes | |
run: ./scripts/release-notes.sh | tee ./RELEASE_NOTES.md | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
path: dist/artifacts | |
- name: Display structure of downloaded files | |
run: find dist/artifacts | |
- name: Create GitHub release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ needs.check_release.outputs.tag_name }} | |
release_name: ${{ steps.version.outputs.string }} | |
body_path: ./RELEASE_NOTES.md | |
draft: false | |
prerelease: false | |
- name: Prepare release notes | |
run: ./scripts/release-notes.sh | tee ./RELEASE_NOTES.md | |
- name: Upload Linux asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/iaito-amd64.deb/iaito/iaito_${{ steps.version.outputs.string }}_amd64.deb | |
asset_name: iaito_${{ steps.version.outputs.string }}_amd64.deb | |
asset_content_type: application/vnd.debian.binary-package | |
- name: Upload macOS asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/iaito-x64.dmg/iaito.dmg | |
asset_name: iaito_${{ steps.version.outputs.string }}_x64.dmg | |
asset_content_type: application/vnd.debian.binary-package | |
- name: Upload Windows QtDeploy asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/iaito.zip/iaito.zip | |
asset_name: iaito-${{ steps.version.outputs.string }}-w64.zip | |
asset_content_type: application/zip | |
- name: Upload Windows executable | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/artifacts/iaito.exe/iaito.exe | |
asset_name: iaito-${{ steps.version.outputs.string }}.exe | |
asset_content_type: application/zip |