From 4c435ea542b3212fdb537da27ce1a8815bd701f3 Mon Sep 17 00:00:00 2001 From: tinyAdapter Date: Wed, 20 Nov 2024 19:01:51 +0800 Subject: [PATCH 1/2] fix: github actions failed --- .github/workflows/conda.yaml | 6 ++---- .github/workflows/macOS.yaml | 8 ++++---- .github/workflows/rat.yaml | 8 ++++++-- .github/workflows/ubuntu.yaml | 11 ++++++++--- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/conda.yaml b/.github/workflows/conda.yaml index 1daa5bcecc..379095c710 100644 --- a/.github/workflows/conda.yaml +++ b/.github/workflows/conda.yaml @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: install-conda-build run: conda install conda-build=3.20.4 anaconda-client - name: conda-config @@ -45,14 +45,12 @@ jobs: ANACONDA_UPLOAD_TOKEN: ${{ secrets.ANACONDA_UPLOAD_TOKEN }} if: ${{ env.ANACONDA_UPLOAD_TOKEN }} run: /usr/share/miniconda/bin/anaconda -t $ANACONDA_UPLOAD_TOKEN upload -u nusdbsystem -l main /usr/share/miniconda/conda-bld/linux-64/singa-*.tar.bz2 --force - # - build-pytest-package-macos: runs-on: macos-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: set permission run: sudo chmod -R 777 /usr/local/miniconda # && xcrun --show-sdk-path diff --git a/.github/workflows/macOS.yaml b/.github/workflows/macOS.yaml index 6b5fde2c29..0338aa2445 100644 --- a/.github/workflows/macOS.yaml +++ b/.github/workflows/macOS.yaml @@ -26,10 +26,10 @@ jobs: runs-on: macos-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: "3.7" + python-version: "3.9" - name: install-build-dependencies run: | brew install protobuf swig opencv glog lmdb numpy @@ -46,7 +46,7 @@ jobs: CMAKE_LIBRARY_PATH: /usr/local/opt/openblas/lib:$CMAKE_LIBRARY_PATH DNNL_ROOT: /tmp/dnnl_mac_1.2.0_cpu_tbb/ - name: build - run: cd build && make + run: cd build && make -j env: CXXFLAGS: -I /Users/runner/hostedtoolcache/Python/3.7.8/x64/lib/python3.7/site-packages/numpy/core/include $CXXFLAGS LD_LIBRARY_PATH: /usr/local/opt/openblas/lib:/tmp/dnnl_mac_1.2.0_cpu_tbb/lib:$LD_LIBRARY_PATH diff --git a/.github/workflows/rat.yaml b/.github/workflows/rat.yaml index b7c588da6c..89ad79f49f 100644 --- a/.github/workflows/rat.yaml +++ b/.github/workflows/rat.yaml @@ -30,14 +30,18 @@ on: # 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 "CheckLicence" - CheckLicence: + check-license: # 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 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' # Runs a single command using the runners shell - name: Licence check with Apache RAT diff --git a/.github/workflows/ubuntu.yaml b/.github/workflows/ubuntu.yaml index feb801a4e2..7ad6874536 100644 --- a/.github/workflows/ubuntu.yaml +++ b/.github/workflows/ubuntu.yaml @@ -45,9 +45,14 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.9" - name: get-oneDNN run: wget https://github.com/oneapi-src/oneDNN/releases/download/v1.1/dnnl_lnx_1.1.0_cpu_gomp.tgz -P /tmp/ && tar zxf /tmp/dnnl_lnx_1.1.0_cpu_gomp.tgz -C /tmp + - name: update APT sources + run: sudo apt-get update - name: setup-sys-env run: sudo apt-get install -y curl wget git cmake - name: install-build-dependencies @@ -57,10 +62,10 @@ jobs: env: DNNL_ROOT: /tmp/dnnl_lnx_1.1.0_cpu_gomp/ - name: build - run: cd build && make -j8 + run: cd build && make -j - name: C++ test run: build/bin/test_singa - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v5 with: flags: singa-cpp From cffc005d11341c6847a31483dc027a4d87ec2d84 Mon Sep 17 00:00:00 2001 From: tinyAdapter Date: Wed, 20 Nov 2024 19:02:04 +0800 Subject: [PATCH 2/2] fix: no Apache license --- doap/doap_SINGA.rdf | 30 ++++++++++--------- .../healthcare/Malaria_Detection/train_cnn.py | 17 +++++++++++ examples/malaria_cnn/train_cnn.py | 17 +++++++++++ .../internal/pg_extension/.cargo/config.toml | 17 +++++++++++ .../pg_extension/template/Cargo.pg11.toml | 17 +++++++++++ .../pg_extension/template/Cargo.pg14.toml | 17 +++++++++++ 6 files changed, 101 insertions(+), 14 deletions(-) diff --git a/doap/doap_SINGA.rdf b/doap/doap_SINGA.rdf index 1dc8607849..e2920214e8 100644 --- a/doap/doap_SINGA.rdf +++ b/doap/doap_SINGA.rdf @@ -1,18 +1,20 @@ diff --git a/examples/healthcare/Malaria_Detection/train_cnn.py b/examples/healthcare/Malaria_Detection/train_cnn.py index bfe810d4f4..8357aaa9a5 100644 --- a/examples/healthcare/Malaria_Detection/train_cnn.py +++ b/examples/healthcare/Malaria_Detection/train_cnn.py @@ -1,3 +1,20 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + from singa import singa_wrap as singa from singa import device from singa import tensor diff --git a/examples/malaria_cnn/train_cnn.py b/examples/malaria_cnn/train_cnn.py index bfe810d4f4..8357aaa9a5 100644 --- a/examples/malaria_cnn/train_cnn.py +++ b/examples/malaria_cnn/train_cnn.py @@ -1,3 +1,20 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + from singa import singa_wrap as singa from singa import device from singa import tensor diff --git a/examples/model_selection/Trails/internal/pg_extension/.cargo/config.toml b/examples/model_selection/Trails/internal/pg_extension/.cargo/config.toml index 9dd8fcf873..3549bd3f2c 100644 --- a/examples/model_selection/Trails/internal/pg_extension/.cargo/config.toml +++ b/examples/model_selection/Trails/internal/pg_extension/.cargo/config.toml @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + [target.'cfg(target_os="macos")'] # Postgres symbols won't be available until runtime rustflags = ["-Clink-arg=-Wl,-undefined,dynamic_lookup"] \ No newline at end of file diff --git a/examples/model_selection/Trails/internal/pg_extension/template/Cargo.pg11.toml b/examples/model_selection/Trails/internal/pg_extension/template/Cargo.pg11.toml index 02b15a4564..691969fe38 100644 --- a/examples/model_selection/Trails/internal/pg_extension/template/Cargo.pg11.toml +++ b/examples/model_selection/Trails/internal/pg_extension/template/Cargo.pg11.toml @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + [package] name = "pg_extension" version = "0.1.0" diff --git a/examples/model_selection/Trails/internal/pg_extension/template/Cargo.pg14.toml b/examples/model_selection/Trails/internal/pg_extension/template/Cargo.pg14.toml index 667fa75360..331d7ac7e1 100644 --- a/examples/model_selection/Trails/internal/pg_extension/template/Cargo.pg14.toml +++ b/examples/model_selection/Trails/internal/pg_extension/template/Cargo.pg14.toml @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + [package] name = "pg_extension" version = "0.1.0"