diff --git a/.github/workflows/i686_linux_clang.yml b/.github/workflows/i686_linux_clang.yml new file mode 100644 index 0000000..2db19ad --- /dev/null +++ b/.github/workflows/i686_linux_clang.yml @@ -0,0 +1,34 @@ +name: i686_linux_clang + +on: [push, pull_request] + +jobs: + + i686_linux_clang: + runs-on: ubuntu-18.04 + env: + CC: clang + steps: + - uses: actions/checkout@v2 + - name: Retrieve test compression corpus + run: | + git clone https://github.com/ariya/compression-corpus.git + cd compression-corpus + cd enwik + unzip enwik8.zip + - run: sudo apt install -y make clang gcc-multilib qemu-user + - run: clang --version + - name: Perform round-trip tests + run: | + cd tests + make test_roundtrip CFLAGS="-static -m32" + file ./test_roundtrip + qemu-i386 ./test_roundtrip + - name: 'Build and run example: 6pack and 6unpack' + run: | + cd examples + make CFLAGS="-static -m32" + qemu-i386 ./6pack -v + qemu-i386 ./6pack ../compression-corpus/enwik/enwik8.txt archive.6pk + qemu-i386 ./6unpack -v + qemu-i386 ./6unpack archive.6pk diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5658c15..8995abf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,42 +1,5 @@ jobs: -- job: 'i686_linux_clang' - pool: - vmImage: 'ubuntu-18.04' - steps: - - script: | - git clone https://github.com/ariya/compression-corpus.git - cd compression-corpus - cd enwik - unzip enwik8.zip - displayName: 'Retrieve test compression corpus' - - script: sudo apt-get -y -qq update - displayName: 'apt-get update' - - script: sudo apt install -y qemu-user - displayName: 'Install requirements' - - script: | - git clone --depth 1 https://github.com/dockcross/dockcross.git && cd dockcross - docker run --rm dockcross/linux-x86 > ./dockcross-linux-x86 - chmod +x ./dockcross-linux-x86 - displayName: 'Prepare Dockcross' - - script: ./dockcross/dockcross-linux-x86 bash -c "sudo apt install -y clang && clang -v" - displayName: 'Check tools versions' - - script: | - ./dockcross/dockcross-linux-x86 bash -c 'sudo apt install -y clang && cd tests && clang -o test_roundtrip -Wall -m32 -std=c90 -static -I.. test_roundtrip.c ../fastlz.c refimpl.c' - cd tests - file ./test_roundtrip - qemu-i386 ./test_roundtrip - displayName: 'Perform round-trip tests' - - script: | - ./dockcross/dockcross-linux-x86 bash -c 'sudo apt install -y clang && cd examples && clang -o 6pack -Wall -m32 -std=c90 -static -I.. 6pack.c ../fastlz.c' - ./dockcross/dockcross-linux-x86 bash -c 'sudo apt install -y clang && cd examples && clang -o 6unpack -Wall -m32 -std=c90 -static -I.. 6unpack.c ../fastlz.c' - cd examples - qemu-i386 ./6pack -v - qemu-i386 ./6pack ../compression-corpus/enwik/enwik8.txt archive.6pk - qemu-i386 ./6unpack -v - qemu-i386 ./6unpack archive.6pk - displayName: 'Build and run examples: 6pack and 6unpack' - - job: 'i686_linux_gcc' pool: vmImage: 'ubuntu-18.04'