From f6db92ac5b59dfb9408607909952bc27424eec72 Mon Sep 17 00:00:00 2001 From: Krishna-13-cyber Date: Mon, 26 Feb 2024 16:44:24 +0530 Subject: [PATCH] Update with reviewed changes --- .github/workflows/arch.yml | 27 ++++++++ .github/workflows/called.yml | 42 ++++++++++++ .github/workflows/platforms.yml | 118 -------------------------------- 3 files changed, 69 insertions(+), 118 deletions(-) create mode 100644 .github/workflows/arch.yml create mode 100644 .github/workflows/called.yml delete mode 100644 .github/workflows/platforms.yml diff --git a/.github/workflows/arch.yml b/.github/workflows/arch.yml new file mode 100644 index 000000000..9cf258791 --- /dev/null +++ b/.github/workflows/arch.yml @@ -0,0 +1,27 @@ +--- +name: 'Arch' +on: + push: + branches: + - master + pull_request: + branches: + - master + + workflow_dispatch: + +jobs: + build_1: + uses: vgvassilev/clad/.github/workflows/called.yml@master + with: + username: x86 + + build_2: + uses: vgvassilev/clad/.github/workflows/called.yml@master + with: + username: armv7 + + build_3: + uses: vgvassilev/clad/.github/workflows/called.yml@master + with: + username: aarch64 \ No newline at end of file diff --git a/.github/workflows/called.yml b/.github/workflows/called.yml new file mode 100644 index 000000000..19e4634a9 --- /dev/null +++ b/.github/workflows/called.yml @@ -0,0 +1,42 @@ +name: 'Reusable Workflows' + +on: + workflow_call: + inputs: + username: + required: true + type: string + +jobs: + architecture: + runs-on: ubuntu-latest + steps: + - name: Checkout branch + uses: actions/checkout@v3 + - name: "Setup latest Alpine Linux" + uses: jirutka/setup-alpine@v1 + with: + arch: ${{ inputs.username }} + branch: edge + packages: > + llvm-dev + clang-dev + clang-static + llvm17-static + llvm17-gtest + cmake + llvm + clang + make + - name: "Setup" + run: | + clang --version + make --version + shell: alpine.sh {0} + + - name: "Compile library" + run: | + mkdir build && cd build + cmake -DLLVM_EXTERNAL_LIT="$(which lit)" ../../clad + make -j 8 check-clad + shell: alpine.sh {0} \ No newline at end of file diff --git a/.github/workflows/platforms.yml b/.github/workflows/platforms.yml deleted file mode 100644 index 05a4e1da0..000000000 --- a/.github/workflows/platforms.yml +++ /dev/null @@ -1,118 +0,0 @@ ---- -name: 'Platforms' -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build_1: - runs-on: ubuntu-latest - name: x86 - steps: - - name: Checkout branch - uses: actions/checkout@v3 - - name: "Setup latest Alpine Linux" - uses: jirutka/setup-alpine@v1 - with: - arch: x86 - branch: edge - packages: > - llvm-dev - clang-dev - clang-static - llvm17-static - llvm17-gtest - cmake - llvm - clang - make - git - - name: "Setup" - run: | - clang --version - make --version - shell: alpine.sh {0} - - - name: "Compile library" - run: | - mkdir build && cd build - cmake -DLLVM_DIR=/usr/lib/ -DCMAKE_BUILD_TYPE=DEBUG -DLLVM_EXTERNAL_LIT="$(which lit)" ../../clad - make -j 8 check-clad - shell: alpine.sh {0} - - - build_2: - runs-on: ubuntu-latest - name: armv7 - steps: - - name: Checkout branch - uses: actions/checkout@v3 - - name: "Setup latest Alpine Linux" - uses: jirutka/setup-alpine@v1 - with: - arch: armv7 - branch: edge - packages: > - llvm-dev - clang-dev - clang-static - llvm17-static - llvm17-gtest - cmake - llvm - clang - make - git - - name: "Setup" - run: | - clang --version - make --version - shell: alpine.sh {0} - - - name: "Compile library" - run: | - mkdir build && cd build - cmake -DLLVM_DIR=/usr/lib/ -DCMAKE_BUILD_TYPE=DEBUG -DLLVM_EXTERNAL_LIT="$(which lit)" ../../clad - make -j 8 check-clad - shell: alpine.sh {0} - - - build_3: - runs-on: ubuntu-latest - name: aarch64 - steps: - - name: Checkout branch - uses: actions/checkout@v3 - - name: "Setup latest Alpine Linux" - uses: jirutka/setup-alpine@v1 - with: - arch: aarch64 - branch: edge - packages: > - llvm-dev - clang-dev - clang-static - llvm17-static - llvm17-gtest - cmake - llvm - clang - make - git - - name: "Setup" - run: | - clang --version - make --version - shell: alpine.sh {0} - - - name: "Compile library" - run: | - mkdir build && cd build - cmake -DLLVM_DIR=/usr/lib/ -DCMAKE_BUILD_TYPE=DEBUG -DLLVM_EXTERNAL_LIT="$(which lit)" ../../clad - make -j 8 check-clad - shell: alpine.sh {0} -