-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging main branch changes to this branch
- Loading branch information
Showing
333 changed files
with
91,695 additions
and
80,884 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
BasedOnStyle: LLVM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu | ||
{ | ||
"name": "LLVM Manylinux", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"image": "ghcr.io/iith-compilers/manylinux2014-llvm/manylinux2014-llvm:x86-llvm17" | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "uname -a", | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Doxygen Action | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
|
||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Doxygen Action | ||
uses: mattnotmitt/[email protected] | ||
with: | ||
# Path to Doxyfile | ||
doxyfile-path: "./Doxyfile" # default is ./Doxyfile | ||
# Working directory | ||
working-directory: "." # default is . | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | ||
# Default Doxyfile build documentation to html directory. | ||
# Change the directory if changes in Doxyfile | ||
publish_dir: ./html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: pre-commit/[email protected].0 | ||
- uses: pre-commit/[email protected].3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: GitHub Wiki upload | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: [docs/**, .github/workflows/publish-docs.yml] | ||
|
||
concurrency: | ||
group: wiki | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
wiki: | ||
name: Publish to GitHub Wiki | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{github.repository}} | ||
path: ${{github.repository}} | ||
|
||
- name: Checkout Wiki | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{github.repository}}.wiki | ||
path: ${{github.repository}}.wiki | ||
|
||
- name: Push to wiki | ||
run: | | ||
set -e | ||
cd $GITHUB_WORKSPACE/${{github.repository}}.wiki | ||
cp -r $GITHUB_WORKSPACE/${{github.repository}}/docs/* . | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add . | ||
git diff-index --quiet HEAD || git commit -m "action: wiki sync" && git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Upload to PyPI | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
workflow_dispatch: | ||
inputs: | ||
pypi_repo: | ||
description: 'Repo to upload to (testpypi or pypi)' | ||
default: 'pypi' | ||
required: true | ||
type: choice | ||
options: | ||
- testpypi | ||
- pypi | ||
|
||
jobs: | ||
build_wheels: | ||
uses: ./.github/workflows/wheel.yml | ||
|
||
|
||
build_sdist: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/iith-compilers/manylinux2014-llvm/manylinux2014-llvm:x86-llvm17 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build IR2Vec | ||
run: bash Manylinux2014_Compliant_Source/pkg/build.sh | ||
|
||
- name: Build sdist | ||
run: cd Manylinux2014_Compliant_Source/pkg && pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: Manylinux2014_Compliant_Source/pkg/dist/*.tar.gz | ||
|
||
|
||
upload_pypi: | ||
permissions: | ||
id-token: write | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- name: Publish package to TestPyPI | ||
uses: pypa/[email protected] | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
if: ${{ github.event.inputs.pypi_repo != 'pypi' }} | ||
|
||
- name: Publish package to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
repository-url: https://upload.pypi.org/legacy/ | ||
if: ${{ github.event.inputs.pypi_repo == 'pypi' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build wheels | ||
|
||
on: [push, workflow_dispatch, workflow_call] | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
with: | ||
package-dir: Manylinux2014_Compliant_Source/pkg | ||
env: | ||
CIBW_SKIP: "pp* *-musllinux_*" | ||
CIBW_ARCHS: "x86_64" | ||
CIBW_MANYLINUX_X86_64_IMAGE: "ghcr.io/iith-compilers/manylinux2014-llvm/manylinux2014-llvm:x86-llvm17" | ||
CIBW_BEFORE_ALL: "bash Manylinux2014_Compliant_Source/pkg/build.sh" | ||
CIBW_TEST_REQUIRES: pytest | ||
CIBW_TEST_COMMAND: "pytest {project}/Manylinux2014_Compliant_Source/pkg/tests" | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./wheelhouse/*.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,25 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
rev: v4.0.1 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
exclude: test-suite/oracle | ||
- repo: https://github.com/psf/black | ||
rev: 19.3b0 | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pocc/pre-commit-hooks | ||
rev: python | ||
rev: v1.1.1 | ||
hooks: | ||
- id: clang-format | ||
args: [-i] | ||
- repo: https://github.com/dfm/black_nbconvert | ||
rev: stable | ||
hooks: | ||
- id: black_nbconvert | ||
- repo: local | ||
hooks: | ||
- id: shfmt | ||
name: shfmt | ||
minimum_pre_commit_version: 2.4.0 | ||
language: golang | ||
additional_dependencies: [mvdan.cc/sh/v3/cmd/[email protected]] | ||
entry: shfmt | ||
args: [-w] | ||
types: [shell] | ||
# - repo: https://github.com/dfm/black_nbconvert | ||
# rev: v0.4.0 | ||
# hooks: | ||
# - id: black_nbconvert | ||
- repo: https://github.com/maxwinterstein/shfmt-py | ||
rev: v3.4.3.1 | ||
hooks: | ||
- id: shfmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
cmake_minimum_required(VERSION 3.13) | ||
project(IR2Vec VERSION 1.1.0) | ||
project(ir2vec VERSION 2.1.2) | ||
|
||
include(AddLLVM) | ||
include(HandleLLVMOptions) | ||
include(LLVMDistributionSupport) | ||
set(IR2VEC_LIB "IR2Vec") | ||
set(IR2VEC_LIB_STATIC "IR2Vec_Static") | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") | ||
|
||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
|
||
find_package (Eigen3 3.3.7 QUIET NO_MODULE) | ||
|
||
if (Eigen3_FOUND) | ||
message(STATUS "Found Eigen3: ${Eigen3_DIR}") | ||
add_definitions(-DEIGEN_FOUND) | ||
endif() | ||
|
||
set(CMAKE_CXX_STANDARD 17 CACHE STRING "") | ||
|
||
# LLVM is normally built without RTTI. Be consistent with that. | ||
if(NOT LLVM_ENABLE_RTTI) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") | ||
endif() | ||
|
||
add_subdirectory(src) |
Oops, something went wrong.