From 2294499a8d68687b98232cd0668656e870509060 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Wed, 30 Oct 2024 14:43:31 +0100 Subject: [PATCH] ci: Only download required repositories This should speed up CI a bit. --- .github/project_build_all_apps.yml | 36 +++++++++++++++++++++++++ .github/project_build_cc_target.yml | 36 +++++++++++++++++++++++++ .github/project_newt_test_all.yml | 39 +++++++++++++++++++++++++++ .github/workflows/build_all_apps.yml | 2 +- .github/workflows/build_cc_target.yml | 2 +- .github/workflows/newt_test_all.yml | 2 +- 6 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 .github/project_build_all_apps.yml create mode 100644 .github/project_build_cc_target.yml create mode 100644 .github/project_newt_test_all.yml diff --git a/.github/project_build_all_apps.yml b/.github/project_build_all_apps.yml new file mode 100644 index 0000000000..c030061996 --- /dev/null +++ b/.github/project_build_all_apps.yml @@ -0,0 +1,36 @@ +# +# 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. +# + +project.name: "my_project" + +project.repositories: + - apache-mynewt-core + +# Use github's distribution mechanism for core ASF libraries. +# This provides mirroring automatically for us. +# +repository.apache-mynewt-core: + type: github + vers: 0.0.0 + user: apache + repo: mynewt-core + +project.repositories.ignored: + - stm-* + - atmel-samd21xx diff --git a/.github/project_build_cc_target.yml b/.github/project_build_cc_target.yml new file mode 100644 index 0000000000..c030061996 --- /dev/null +++ b/.github/project_build_cc_target.yml @@ -0,0 +1,36 @@ +# +# 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. +# + +project.name: "my_project" + +project.repositories: + - apache-mynewt-core + +# Use github's distribution mechanism for core ASF libraries. +# This provides mirroring automatically for us. +# +repository.apache-mynewt-core: + type: github + vers: 0.0.0 + user: apache + repo: mynewt-core + +project.repositories.ignored: + - stm-* + - atmel-samd21xx diff --git a/.github/project_newt_test_all.yml b/.github/project_newt_test_all.yml new file mode 100644 index 0000000000..960c844bad --- /dev/null +++ b/.github/project_newt_test_all.yml @@ -0,0 +1,39 @@ +# +# 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. +# + +project.name: "my_project" + +project.repositories: + - apache-mynewt-core + +# Use github's distribution mechanism for core ASF libraries. +# This provides mirroring automatically for us. +# +repository.apache-mynewt-core: + type: github + vers: 0.0.0 + user: apache + repo: mynewt-core + +project.repositories.allowed: + - apache-mynewt-core + - apache-mynewt-nimble + - apache-mynewt-mcumgr + - mcuboot + - mbedtls diff --git a/.github/workflows/build_all_apps.yml b/.github/workflows/build_all_apps.yml index e18a1c1586..5fea050909 100644 --- a/.github/workflows/build_all_apps.yml +++ b/.github/workflows/build_all_apps.yml @@ -52,7 +52,7 @@ jobs: shell: bash run: | newt new build - cp -f .github/project.yml build/project.yml + cp -f .github/project_build_all_apps.yml build/project.yml cd build newt upgrade --shallow=1 git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA diff --git a/.github/workflows/build_cc_target.yml b/.github/workflows/build_cc_target.yml index 2adddbe216..88fe1a1a14 100644 --- a/.github/workflows/build_cc_target.yml +++ b/.github/workflows/build_cc_target.yml @@ -47,7 +47,7 @@ jobs: shell: bash run: | newt new build - cp -f .github/project.yml build/project.yml + cp -f .github/project_build_cc_target.yml build/project.yml cd build newt upgrade --shallow=1 git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA diff --git a/.github/workflows/newt_test_all.yml b/.github/workflows/newt_test_all.yml index 8bbbfcedbf..655bbce988 100644 --- a/.github/workflows/newt_test_all.yml +++ b/.github/workflows/newt_test_all.yml @@ -52,7 +52,7 @@ jobs: shell: bash run: | newt new build - cp -f .github/project.yml build/project.yml + cp -f .github/project_newt_test_all.yml build/project.yml cd build newt upgrade --shallow=1 git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA