Skip to content

Commit 0f01921

Browse files
authored
Merge pull request #5 from litghost/move_to_github_actions
Move from Travis CI to Github Actions.
2 parents 5d4ac57 + 56cec97 commit 0f01921

File tree

6 files changed

+67
-37
lines changed

6 files changed

+67
-37
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
7+
Run-tests:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: ['3.7', '3.8', '3.9']
12+
steps:
13+
14+
- uses: actions/checkout@v1
15+
with:
16+
submodules: recursive
17+
18+
- name: Setup Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install
24+
run: |
25+
pip install --upgrade -r requirements.txt
26+
27+
- name: Check formatting
28+
run: ./.github/workflows/format.sh
29+
30+
- name: Get and build tools
31+
run: |
32+
make env
33+
git clone -b interchange https://github.com/Xilinx/RapidWright.git $GITHUB_WORKSPACE/env/RapidWright
34+
make -C "$GITHUB_WORKSPACE/env/RapidWright" update_jars
35+
git clone https://github.com/capnproto/capnproto-java.git $GITHUB_WORKSPACE/env/capnproto-java
36+
37+
- name: Test
38+
run: ./.github/workflows/test.sh
39+
40+
- name: "License Checks"
41+
run: |
42+
./.github/check_license.sh
43+
./.github/check_python_scripts.sh

.github/workflows/format.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
make format
4+
test $(git status --porcelain | wc -l) -eq 0 || { git diff; false; }

.github/workflows/test.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
export RAPIDWRIGHT_PATH="$GITHUB_WORKSPACE/env/RapidWright"
4+
5+
# Create the device resource for the test part.
6+
pushd "$GITHUB_WORKSPACE/env"
7+
"$RAPIDWRIGHT_PATH/scripts/invoke_rapidwright.sh" \
8+
com.xilinx.rapidwright.interchange.DeviceResourcesExample \
9+
xc7a50tfgg484-1
10+
popd
11+
12+
export CAPNP_PATH="$GITHUB_WORKSPACE/env/capnproto-java/compiler/src/main/schema/"
13+
export INTERCHANGE_SCHEMA_PATH="$GITHUB_WORKSPACE/env/RapidWright/interchange"
14+
export DEVICE_RESOURCE_PATH="$GITHUB_WORKSPACE/env"
15+
16+
make test-py
17+
test $(git status --porcelain | wc -l) -eq 0 || { git diff; false; }

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

fpga_interchange/device_resources.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ def __init__(self, device_resource_capnp):
558558
tile_name = self.strs[tile.name]
559559
tile_name_index = self.string_index[tile_name]
560560
assert tile_name not in self.tile_name_to_tile
561-
tile_type_index = self.tile_type_to_idx[tile.type]
561+
tile_type_index = tile.type
562562
self.tile_name_to_tile[tile_name] = Tile(
563563
tile_index=tile_idx,
564564
tile_name_index=tile_name_index,
@@ -729,7 +729,7 @@ def get_site_pin(self, site, site_pin_index):
729729
730730
"""
731731
tile = self.device_resource_capnp.tileList[site.tile_index]
732-
tile_type_index = self.tile_type_to_idx[tile.type]
732+
tile_type_index = tile.type
733733
tile_type = self.device_resource_capnp.tileTypeList[tile_type_index]
734734
site_type_in_tile_type = tile_type.siteTypes[site.
735735
tile_type_site_type_index]

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
pytest
2-
pycapnp
32
yapf==0.24.0
3+
-e .

0 commit comments

Comments
 (0)