Skip to content

Commit 264a607

Browse files
authored
Merge pull request #338 from k-okada/fix_ga
.github/workflow: integrate all yaml to one
2 parents 71c5c80 + 35920da commit 264a607

File tree

10 files changed

+131
-130
lines changed

10 files changed

+131
-130
lines changed

.github/workflows/config.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
7+
env:
8+
DISPLAY: ':0.0'
9+
10+
jobs:
11+
ros:
12+
runs-on: ubuntu-latest
13+
# continue-on-error: ${{ matrix.experimental }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- ROS_DISTRO: kinetic
19+
CONTAINER: ubuntu:16.04
20+
ROS_PARALLEL_TEST_JOBS: "-j8"
21+
CATKIN_PARALLEL_JOBS: "-i"
22+
EXTRA_DEB : "python-lxml"
23+
- ROS_DISTRO: melodic
24+
CONTAINER: ubuntu:18.04
25+
ROS_PARALLEL_TEST_JOBS: "-j8"
26+
CATKIN_PARALLEL_JOBS: "-i"
27+
- ROS_DISTRO: noetic
28+
CONTAINER: ubuntu:20.04
29+
ROS_PARALLEL_TEST_JOBS: "-j8"
30+
CATKIN_PARALLEL_JOBS: "-i"
31+
- ROS_DISTRO: noetic
32+
CONTAINER: ubuntu:20.04
33+
ROS_PARALLEL_TEST_JOBS: "-j8"
34+
CATKIN_PARALLEL_JOBS: "-i"
35+
USE_DEB : false
36+
37+
38+
container: ${{ matrix.CONTAINER }}
39+
steps:
40+
- name: Install latest git ( use sudo for ros-ubuntu )
41+
run: |
42+
(apt-get update && apt-get install -y sudo) || echo "OK"
43+
sudo apt-get update && sudo apt-get install -y software-properties-common && sudo apt-get update && sudo add-apt-repository -y ppa:git-core/ppa && sudo apt-get update && sudo apt-get install -y git
44+
45+
- name: work around permission issue # https://github.com/actions/checkout/issues/760#issuecomment-1097501613
46+
run: |
47+
set -x
48+
export USER=$(whoami)
49+
if [ "${{ matrix.CONTAINER }}" = "jskrobotics/ros-ubuntu:14.04" ]; then
50+
git config --global --add safe.directory $GITHUB_WORKSPACE || echo "OK" # Show 'could not lock config file /github/home/.gitconfig: Permission denied', but it is ok
51+
sudo mkdir -p /__w/
52+
sudo chmod 777 -R /__w/
53+
sudo chown -R $USER $HOME
54+
# sudo mkdir -p /home/runner/work/_temp/_github_workflow/
55+
# sudo chown -R $USER $HOME /home/runner/work/_temp/_github_workflow/
56+
# ls -al /home/runner/work/_temp/_github_workflow/
57+
else
58+
git config --global --add safe.directory $GITHUB_WORKSPACE
59+
fi
60+
61+
- name: Chcekout
62+
uses: actions/checkout@v2
63+
64+
- name: Start X server
65+
run: |
66+
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections || echo "failing on ros-ubuntu is OK" # set non interactive tzdata https://stackoverflow.com/questions/8671308/non-interactive-method-for-dpkg-reconfigure-tzdata
67+
sudo apt-get -y -qq install mesa-utils x11-xserver-utils xserver-xorg-video-dummy wget
68+
export DISPLAY=:0
69+
wget https://raw.githubusercontent.com/jsk-ros-pkg/jsk_travis/master/dummy.xorg.conf -O /tmp/dummy.xorg.conf
70+
sudo Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile /tmp/xorg.log -config /tmp/dummy.xorg.conf $DISPLAY &
71+
sleep 3 # wait x server up
72+
export QT_X11_NO_MITSHM=1 # http://wiki.ros.org/docker/Tutorials/GUI
73+
xhost +local:root
74+
75+
- name: Run jsk_travis
76+
uses: jsk-ros-pkg/jsk_travis@master
77+
with:
78+
ROS_PARALLEL_JOBS : ${{ matrix.ROS_PARALLEL_JOBS }}
79+
CATKIN_PARALLEL_JOBS : ${{ matrix.CATKIN_PARALLEL_JOBS }}
80+
ROS_PARALLEL_TEST_JOBS : ${{ matrix.ROS_PARALLEL_TEST_JOBS }}
81+
CATKIN_PARALLEL_TEST_JOBS : ${{ matrix.CATKIN_PARALLEL_TEST_JOBS }}
82+
ROS_DISTRO : ${{ matrix.ROS_DISTRO }}
83+
USE_DEB : ${{ matrix.USE_DEB }}
84+
NOT_TEST_INSTALL : ${{ matrix.NOT_TEST_INSTALL }}
85+
TEST_PKGS : ${{ matrix.TEST_PKGS }}
86+
BEFORE_SCRIPT : ${{ matrix.BEFORE_SCRIPT }}
87+
EXTRA_DEB : ${{ matrix.EXTRA_DEB }}
88+
89+
kinetic_i386:
90+
runs-on: ubuntu-latest
91+
name: kinetic_i386
92+
93+
container: i386/ubuntu:16.04
94+
95+
steps:
96+
- name: Install latest git ( use sudo for ros-ubuntu )
97+
run: apt-get update && apt-get install -y software-properties-common && apt-get update && add-apt-repository -y ppa:git-core/ppa && apt-get update && apt-get install -y git
98+
- name: Chcekout
99+
run: |
100+
git config --global --add safe.directory $GITHUB_WORKSPACE
101+
git clone --depth=1 $GITHUB_SERVER_URL/$GITHUB_REPOSITORY $GITHUB_WORKSPACE
102+
cd $GITHUB_WORKSPACE
103+
git checkout -qf $GITHUB_SHA || (git fetch -q origin +$GITHUB_REF; git checkout -qf FETCH_HEAD)
104+
git submodule update --init .travis
105+
- name: Run jsk_travis
106+
uses: jsk-ros-pkg/jsk_travis@master
107+
with:
108+
EXTRA_DEB : "python-lxml"
109+
ROS_DISTRO : kinetic
110+
ROS_PARALLEL_TEST_JOBS : "-j8"
111+
CATKIN_PARALLEL_JOBS: "-i"
112+
ROSDEP_ADDITIONAL_OPTIONS : "-n -q -r --ignore-src --skip-keys=python-google-cloud-texttospeech-pip --skip-keys=python-dialogflow-pip" # Skip installation of grpcio by pip because it causes error
113+
# https://github.com/jsk-ros-pkg/jsk_3rdparty/pull/237 : (Note that pip==21.0.1 is incompatible with python 2.x)
114+
BEFORE_SCRIPT : "sudo pip install virtualenv==15.1.0"

.github/workflows/kinetic-i386.yml

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

.github/workflows/kinetic.yml

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

.github/workflows/melodic.yml

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

.github/workflows/noetic-usr-src.yml

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

.github/workflows/noetic.yml

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

.github/workflows/python3.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ jobs:
1010
container: ubuntu:20.04
1111

1212
steps:
13+
- name: Install latest git to download .git directory in actions/checkout@v2 ( use sudo for ros-ubuntu )
14+
run: apt-get update && apt-get install -y software-properties-common && apt-get update && add-apt-repository -y ppa:git-core/ppa && apt-get update && apt-get install -y git
15+
- name: work around permission issue # https://github.com/actions/checkout/issues/760#issuecomment-1097501613
16+
run: git config --global --add safe.directory $GITHUB_WORKSPACE
1317
- name: Chcekout
1418
uses: actions/checkout@v2
1519
- name: Check Python3
1620
run: |
17-
apt update -q && apt install -y -q python3
18-
python3 -m compileall .
21+
apt update -q && apt install -y -q python3 git 2to3
22+
bash -c "ret=0; trap 'ret=1' ERR; python3 -m compileall .; 2to3 -w -f except -f execfile -f has_key -f import -f raw_input -f zip .; git diff --exit-code . > /dev/null; echo Exitting with \$ret; exit \$ret"

3rdparty/mini_maxwell/scripts/simple_server/simple_echo_client.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
import sys
55
import argparse
66
import struct
7+
8+
# use raw_input for python2 c.f. https://stackoverflow.com/questions/5868506/backwards-compatible-input-calls-in-python
9+
if hasattr(__builtins__, 'raw_input'):
10+
input = raw_input
11+
712
parser = argparse.ArgumentParser(description='Simple socket client')
813
parser.add_argument("--port", default=8080, type=int)
914
parser.add_argument("--udp", action="store_true")
@@ -18,7 +23,7 @@
1823
else:
1924
server = socket(AF_INET, SOCK_DGRAM)
2025
while True:
21-
data = raw_input('> ')
26+
data = input('> ')
2227
if not data:
2328
break
2429
packer = struct.Struct("!%ds" % len(data))

chaplus_ros/scripts/chaplus_ros.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def topic_cb(self, msg):
112112
response = requests.post(
113113
url=self.url, headers=self.headers, data=self.data)
114114
response_json = response.json()
115-
if not response_json.has_key('bestResponse'):
115+
if 'bestResponse' not in response_json:
116116
best_response = "ごめんなさい、よくわからないです"
117117
else:
118118
best_response = response_json['bestResponse']['utterance']
@@ -130,7 +130,7 @@ def topic_cb(self, msg):
130130
params = {"apikey": self.apikey, "query": msg.data,}
131131
response = requests.post(self.endpoint, params)
132132
response_json = response.json()
133-
if not response_json.has_key('results'):
133+
if 'results' not in response_json:
134134
best_response = "ごめんなさい、よくわからないです"
135135
else:
136136
best_response = response_json["results"][0]["reply"]

ros_speech_recognition/src/ros_speech_recognition/recognize_google_cloud.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,17 @@ def recognize_google_cloud(self, audio_data, credentials_json=None, language="en
8787
if "results" not in response or len(response["results"]) == 0: raise UnknownValueError()
8888
transcript = ""
8989
for result in response["results"]:
90-
if speech_config.has_key('diarizationConfig') and \
90+
if 'diarizationConfig' in speech_config and \
9191
speech_config['diarizationConfig']['enableSpeakerDiarization'] == True:
9292
# when diariazationConfig is true, use words with speakerTag:
9393
speakerTag = None
9494
for word in result["alternatives"][0]["words"]:
95-
if word.has_key('speakerTag'):
95+
if 'speakerTag' in word:
9696
if speakerTag != word['speakerTag']:
9797
speakerTag = word['speakerTag']
9898
transcript += "[{}]".format(speakerTag)
9999
transcript += ' ' + word['word']
100-
elif result["alternatives"][0].has_key("transcript"):
100+
elif "transcript" in result["alternatives"][0]:
101101
print("trasncript?")
102102
transcript += result["alternatives"][0]["transcript"].strip() + " "
103103

0 commit comments

Comments
 (0)