Skip to content

Commit

Permalink
Adapt debian asan test suite with prebuilt slimcc executable
Browse files Browse the repository at this point in the history
  • Loading branch information
ChAoSUnItY committed Dec 3, 2024
1 parent 07817fa commit f7398e9
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 78 deletions.
55 changes: 53 additions & 2 deletions .github/workflows/linux_thirdparty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,45 @@ name: build-test-thirdparty
on: [push, pull_request]

jobs:
host-x86-build:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc, clang]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install prerequisite
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: file build-essential clang
version: 1.0
- name: Build stage 1 artifact
env:
CC: ${{ matrix.compiler }}
run: |
make clean
make slimcc
shell: bash
- name: Test stage 1
run: |
make test || exit 1
shell: bash
- name: Build stage 2 artifact
run: |
make stage2/slimcc
shell: bash
- name: Test stage 2
run: |
make test-stage2 || exit 1
shell: bash
- run: mv slimcc slimcc-${{ matrix.compiler }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: slimcc-${{ matrix.compiler }}
path: slimcc-${{ matrix.compiler }}

docker:
runs-on: ubuntu-latest
steps:
Expand All @@ -29,7 +68,7 @@ jobs:

thirdparty-tests:
runs-on: ubuntu-latest
needs: docker
needs: [docker, host-x86-build]
strategy:
matrix:
include:
Expand Down Expand Up @@ -60,17 +99,29 @@ jobs:
- thirdparty: build_musl
- thirdparty: build_nano
- thirdparty: build_sdl
matrix:
compiler: [gcc, clang]
steps:
- name: Download artifact
- name: Download debian asan artifact
uses: actions/download-artifact@v4
with:
name: debian_asan
path: /tmp

- name: Download pre-built slimcc
uses: actions/download-artifact@v4
with:
name: slimcc-${{ matrix.compiler }}
- run: |
chmod +x slimcc-${{ matrix.compiler }}
- name: Load image
run: docker load --input /tmp/debian_asan.tar


- name: Run test
env:
CC: slimcc-${{ matrix.compiler }}
run: >
sudo docker run debian_asan
su non-root -c
Expand Down
76 changes: 0 additions & 76 deletions .github/workflows/main.yml

This file was deleted.

0 comments on commit f7398e9

Please sign in to comment.