name: tcc on: push: branches: - master pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: build: name: ubuntu-tcc-test runs-on: ubuntu-24.04 steps: - name: Checkout TinyCC repository run: | git clone https://github.com/TinyCC/tinycc cd tinycc git checkout mob git reset --hard 4fccaf61241a5eb72b0777b3a44bd7abbea48604 - name: Compiling and installing TinyCC working-directory: tinycc run: | sh ./configure --prefix=/usr make -j sudo make install - uses: actions/checkout@v6 - name: Checkout our Testsuite Binaries uses: actions/checkout@v6 with: repository: radareorg/radare2-testbins path: test/bins - name: Install dependencies run: | sudo apt update --assume-yes sudo apt-get --assume-yes install gperf || true sudo pip install r2pipe --break-system-packages - name: Configure, build and install env: CC: tcc run: | ./configure --prefix=/usr --with-compiler=tcc make -j sudo make install - name: Run tests env: PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig run: | r2 -v r2r -v export R2R_SKIP_ASM=1 export R2R_SKIP_ARCHOS=1 make -j -C test nodbg: name: ubuntu-tcc-nodbg runs-on: ubuntu-24.04 steps: - name: Checkout TinyCC repository run: | git clone https://github.com/TinyCC/tinycc cd tinycc && git checkout mob git reset --hard 4fccaf61241a5eb72b0777b3a44bd7abbea48604 sudo apt update --assume-yes sudo apt-get --assume-yes install gperf || true sudo pip install r2pipe --break-system-packages - name: Compiling and installing TinyCC working-directory: tinycc run: | sh ./configure --prefix=/usr --without-debugger make -j && sudo make install - uses: actions/checkout@v6 - name: Checkout our Testsuite Binaries uses: actions/checkout@v6 with: repository: radareorg/radare2-testbins path: test/bins - name: Configure, build and install env: CC: tcc run: | ./configure --prefix=/usr --with-compiler=tcc make -j sudo make install - name: Run tests env: PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig run: | r2 -v r2r -v export R2R_SKIP_ASM=1 export R2R_SKIP_ARCHOS=1 make -j -C test r2pm: name: r2pm-tcc runs-on: ubuntu-24.04 steps: - name: Checkout TinyCC repository run: | git clone https://github.com/TinyCC/tinycc cd tinycc git checkout mob git reset --hard 4fccaf61241a5eb72b0777b3a44bd7abbea48604 - name: Compiling and installing TinyCC working-directory: tinycc run: | sh ./configure --prefix=/usr make -j sudo make install - uses: actions/checkout@v6 - name: Configure, build and install env: CC: tcc CFLAGS: -O0 run: | ./configure --prefix=/usr --with-compiler=tcc make -j sudo make install - name: Initialize and update the r2pm package database run: r2pm -U - name: Install samurai run: r2pm -i samurai - name: Install samurai (clean) run: r2pm -ci samurai - name: Install samurai (native) run: r2pm -i samurai - name: Install muon run: r2pm -i muon # - name: Install muon (native) # run: r2pm -i muon - name: Building r2 with muon+samu run: | r2pm -r muon setup b r2pm -r samu -j4 -C b >/dev/null syslibs: name: ubuntu-tcc-syslibs runs-on: ubuntu-24.04 steps: - name: Checkout TinyCC repository run: | git clone https://github.com/TinyCC/tinycc cd tinycc && git checkout mob git reset --hard 4fccaf61241a5eb72b0777b3a44bd7abbea48604 sudo apt-get update --assume-yes sudo apt-get --assume-yes install gperf || true sudo pip install r2pipe --break-system-packages - name: Compiling and installing TinyCC working-directory: tinycc run: | sh ./configure --prefix=/usr --without-debugger make -j && sudo make install - uses: actions/checkout@v6 - name: Checkout our Testsuite Binaries uses: actions/checkout@v6 with: repository: radareorg/radare2-testbins path: test/bins - name: Configure, build and install env: CC: tcc run: | sudo apt-get update --assume-yes sudo apt-get --assume-yes install libxxhash-dev liblz4-dev libzip-dev libmagic-dev libcapstone-dev cp -f dist/plugins-cfg/plugins.cs4.cfg plugins.cfg ./configure --prefix=/usr --with-compiler=tcc \ --with-syscapstone \ --with-sysxxhash \ --with-sysmagic \ --with-syszip \ --with-syslz4 make -j sudo make install - name: Run tests env: PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig run: | r2 -v r2r -v export R2R_SKIP_ASM=1 export R2R_SKIP_ARCHOS=1 make -j -C test/unit leak-check: name: ubuntu-tcc-leaks runs-on: ubuntu-24.04 steps: - name: Checkout TinyCC repository run: | git clone https://github.com/TinyCC/tinycc cd tinycc git checkout mob git reset --hard 4fccaf61241a5eb72b0777b3a44bd7abbea48604 - name: Compiling and installing TinyCC working-directory: tinycc run: | sh ./configure --prefix=/usr make -j sudo make install - uses: actions/checkout@v6 - name: Checkout our Testsuite Binaries uses: actions/checkout@v6 with: repository: radareorg/radare2-testbins path: test/bins - name: Install dependencies run: | sudo apt update --assume-yes sudo apt-get --assume-yes install gperf valgrind sudo pip install r2pipe --break-system-packages - name: Configure, build and install env: CC: tcc run: | ./configure --prefix=/usr --with-compiler=tcc make -j sudo make install - name: Run leak tests env: PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig run: | valgrind --version r2 -v r2r -v r2r test/db/leak