Skip to content

Commit

Permalink
Migrate Clang for i686 Linux CI run to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ariya committed Jun 26, 2020
1 parent 4769e2a commit 01bd01d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 37 deletions.
34 changes: 34 additions & 0 deletions .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
37 changes: 0 additions & 37 deletions 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'
Expand Down

0 comments on commit 01bd01d

Please sign in to comment.