Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/google/cpu_features.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2022-03-15 15:26:25 +0300
committerGitHub <noreply@github.com>2022-03-15 15:26:25 +0300
commitc219c921c5120a5a5862bb60bb7031dc4833f6c7 (patch)
tree2fb89463d04b06e48c4e4e41a07be08ffb4be277
parent70ca4fd06fc56a115f48a0ebb6a5d9a3b24fb7b8 (diff)
Move ci folder and make naming more consistent (#233)
-rw-r--r--.dockerignore8
-rw-r--r--.github/workflows/aarch64_linux_cmake.yml (renamed from .github/workflows/aarch64_linux.yml)8
-rw-r--r--.github/workflows/amd64_freebsd_cmake.yml (renamed from .github/workflows/amd64_freebsd.yml)6
-rw-r--r--.github/workflows/amd64_linux.yml31
-rw-r--r--.github/workflows/amd64_linux_bazel.yml (renamed from .github/workflows/amd64_bazel_linux.yml)2
-rw-r--r--.github/workflows/amd64_linux_cmake.yml31
-rw-r--r--.github/workflows/amd64_macos_cmake.yml (renamed from .github/workflows/amd64_macos.yml)2
-rw-r--r--.github/workflows/amd64_windows_cmake.yml (renamed from .github/workflows/amd64_windows.yml)2
-rw-r--r--.github/workflows/arm_linux_cmake.yml (renamed from .github/workflows/arm_linux.yml)8
-rw-r--r--.github/workflows/mips_linux_cmake.yml (renamed from .github/workflows/mips_linux.yml)8
-rw-r--r--cmake/ci/Makefile (renamed from ci/Makefile)4
-rw-r--r--cmake/ci/README.md (renamed from ci/README.md)28
-rw-r--r--cmake/ci/doc/docker.dot (renamed from ci/doc/docker.dot)0
-rw-r--r--cmake/ci/doc/docker.svg (renamed from ci/doc/docker.svg)0
-rwxr-xr-xcmake/ci/doc/generate_image.sh (renamed from ci/doc/generate_image.sh)0
-rw-r--r--cmake/ci/docker/amd64/Dockerfile (renamed from ci/docker/amd64/Dockerfile)2
-rw-r--r--cmake/ci/docker/toolchain/Dockerfile (renamed from ci/docker/toolchain/Dockerfile)0
-rw-r--r--cmake/ci/sample/CMakeLists.txt (renamed from ci/sample/CMakeLists.txt)0
-rw-r--r--cmake/ci/sample/main.cpp (renamed from ci/sample/main.cpp)0
-rw-r--r--cmake/ci/vagrant/freebsd/Vagrantfile (renamed from ci/vagrant/freebsd/Vagrantfile)10
-rw-r--r--scripts/generate_badges.d43
21 files changed, 83 insertions, 110 deletions
diff --git a/.dockerignore b/.dockerignore
index 716b782..65950ea 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,8 +1,8 @@
# Project Files unneeded by docker
-ci/Makefile
-ci/docker
-ci/doc
-ci/cache
+cmake/ci/Makefile
+cmake/ci/docker
+cmake/ci/doc
+cmake/ci/cache
.git
.gitignore
.github
diff --git a/.github/workflows/aarch64_linux.yml b/.github/workflows/aarch64_linux_cmake.yml
index 2de7289..7147217 100644
--- a/.github/workflows/aarch64_linux.yml
+++ b/.github/workflows/aarch64_linux_cmake.yml
@@ -1,4 +1,4 @@
-name: aarch64 Linux
+name: AArch64 Linux CMake
on:
push:
@@ -9,7 +9,7 @@ on:
jobs:
# Building using the github runner environement directly.
- aarch64:
+ make:
runs-on: ubuntu-latest
strategy:
matrix:
@@ -23,6 +23,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build
- run: make --directory=ci ${TARGET}_build
+ run: make --directory=cmake/ci ${TARGET}_build
- name: Test
- run: make --directory=ci ${TARGET}_test
+ run: make --directory=cmake/ci ${TARGET}_test
diff --git a/.github/workflows/amd64_freebsd.yml b/.github/workflows/amd64_freebsd_cmake.yml
index eeab380..8bad4f8 100644
--- a/.github/workflows/amd64_freebsd.yml
+++ b/.github/workflows/amd64_freebsd_cmake.yml
@@ -1,4 +1,4 @@
-name: amd64 FreeBSD
+name: amd64 FreeBSD CMake
on:
push:
@@ -10,7 +10,7 @@ on:
jobs:
# Only MacOS hosted runner provides virtualisation with vagrant/virtualbox installed.
# see: https://github.com/actions/virtual-environments/tree/main/images/macos
- freebsd:
+ make:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
@@ -19,4 +19,4 @@ jobs:
- name: VirtualBox version
run: virtualbox -h
- name: Build
- run: cd ci/vagrant/freebsd && vagrant up
+ run: cd cmake/ci/vagrant/freebsd && vagrant up
diff --git a/.github/workflows/amd64_linux.yml b/.github/workflows/amd64_linux.yml
deleted file mode 100644
index 21f4f90..0000000
--- a/.github/workflows/amd64_linux.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-name: amd64 Linux
-
-on:
- push:
- pull_request:
- schedule:
- # min hours day(month) month day(week)
- - cron: '0 0 7,22 * *'
-
-jobs:
- # Building using the github runner environement directly.
- make:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Env
- run: make --directory=ci amd64_env
- - name: Devel
- run: make --directory=ci amd64_devel
- - name: Build
- run: make --directory=ci amd64_build
- - name: Test
- run: make --directory=ci amd64_test
- - name: Install Env
- run: make --directory=ci amd64_install_env
- - name: Install Devel
- run: make --directory=ci amd64_install_devel
- - name: Install Build
- run: make --directory=ci amd64_install_build
- - name: Install Test
- run: make --directory=ci amd64_install_test
diff --git a/.github/workflows/amd64_bazel_linux.yml b/.github/workflows/amd64_linux_bazel.yml
index 6a1add3..599faf5 100644
--- a/.github/workflows/amd64_bazel_linux.yml
+++ b/.github/workflows/amd64_linux_bazel.yml
@@ -1,4 +1,4 @@
-name: amd64 Bazel Linux
+name: amd64 Linux Bazel
on:
push:
diff --git a/.github/workflows/amd64_linux_cmake.yml b/.github/workflows/amd64_linux_cmake.yml
new file mode 100644
index 0000000..90ccc80
--- /dev/null
+++ b/.github/workflows/amd64_linux_cmake.yml
@@ -0,0 +1,31 @@
+name: amd64 Linux CMake
+
+on:
+ push:
+ pull_request:
+ schedule:
+ # min hours day(month) month day(week)
+ - cron: '0 0 7,22 * *'
+
+jobs:
+ # Building using the github runner environement directly.
+ make:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Env
+ run: make --directory=cmake/ci amd64_env
+ - name: Devel
+ run: make --directory=cmake/ci amd64_devel
+ - name: Build
+ run: make --directory=cmake/ci amd64_build
+ - name: Test
+ run: make --directory=cmake/ci amd64_test
+ - name: Install Env
+ run: make --directory=cmake/ci amd64_install_env
+ - name: Install Devel
+ run: make --directory=cmake/ci amd64_install_devel
+ - name: Install Build
+ run: make --directory=cmake/ci amd64_install_build
+ - name: Install Test
+ run: make --directory=cmake/ci amd64_install_test
diff --git a/.github/workflows/amd64_macos.yml b/.github/workflows/amd64_macos_cmake.yml
index 19ec18c..3756500 100644
--- a/.github/workflows/amd64_macos.yml
+++ b/.github/workflows/amd64_macos_cmake.yml
@@ -1,4 +1,4 @@
-name: amd64 macOS
+name: amd64 MacOS CMake
on:
push:
diff --git a/.github/workflows/amd64_windows.yml b/.github/workflows/amd64_windows_cmake.yml
index 7ff1ac0..7118533 100644
--- a/.github/workflows/amd64_windows.yml
+++ b/.github/workflows/amd64_windows_cmake.yml
@@ -1,4 +1,4 @@
-name: amd64 Windows
+name: amd64 Windows CMake
on:
push:
diff --git a/.github/workflows/arm_linux.yml b/.github/workflows/arm_linux_cmake.yml
index 2272188..87bb6bb 100644
--- a/.github/workflows/arm_linux.yml
+++ b/.github/workflows/arm_linux_cmake.yml
@@ -1,4 +1,4 @@
-name: arm Linux
+name: ARM Linux CMake
on:
push:
@@ -9,7 +9,7 @@ on:
jobs:
# Building using the github runner environement directly.
- arm:
+ make:
runs-on: ubuntu-latest
strategy:
matrix:
@@ -26,6 +26,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build
- run: make --directory=ci ${TARGET}_build
+ run: make --directory=cmake/ci ${TARGET}_build
- name: Test
- run: make --directory=ci ${TARGET}_test
+ run: make --directory=cmake/ci ${TARGET}_test
diff --git a/.github/workflows/mips_linux.yml b/.github/workflows/mips_linux_cmake.yml
index 571de3a..9ce7901 100644
--- a/.github/workflows/mips_linux.yml
+++ b/.github/workflows/mips_linux_cmake.yml
@@ -1,4 +1,4 @@
-name: mips Linux
+name: MIPS Linux CMake
on:
push:
@@ -9,7 +9,7 @@ on:
jobs:
# Building using the github runner environement directly.
- mips:
+ make:
runs-on: ubuntu-latest
strategy:
matrix:
@@ -25,6 +25,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build
- run: make --directory=ci ${TARGET}_build
+ run: make --directory=cmake/ci ${TARGET}_build
- name: Test
- run: make --directory=ci ${TARGET}_test
+ run: make --directory=cmake/ci ${TARGET}_test
diff --git a/ci/Makefile b/cmake/ci/Makefile
index 47ea30a..dc19af8 100644
--- a/ci/Makefile
+++ b/cmake/ci/Makefile
@@ -113,7 +113,7 @@ $(targets_amd64): amd64_%: docker/amd64/Dockerfile
--tag ${IMAGE}:amd64_$* \
--target=$* \
-f $< \
- ..
+ ../..
#$(info Create targets: save_amd64 $(addprefix save_amd64_, $(STAGES)) (debug).)
save_targets_amd64 = $(addprefix save_amd64_, $(STAGES))
@@ -160,7 +160,7 @@ $$(targets_toolchain_$1): %_$1: docker/toolchain/Dockerfile
--build-arg TARGET=$$* \
--target=$1 \
-f $$< \
- ..
+ ../..
#$$(info Create targets: save_toolchain_$1 $(addprefix save_, $(addsuffix _$1, $(TOOLCHAIN_TARGETS))) (debug).)
save_targets_toolchain_$1 = $(addprefix save_, $(addsuffix _$1, $(TOOLCHAIN_TARGETS)))
diff --git a/ci/README.md b/cmake/ci/README.md
index a7d0123..b6e6628 100644
--- a/ci/README.md
+++ b/cmake/ci/README.md
@@ -7,20 +7,20 @@
| Windows | [![][img_4a]][lnk_4a] | ![][img_na] | ![][img_na] | ![][img_na] |
[img_na]: https://img.shields.io/badge/build-N%2FA-lightgrey
-[lnk_1a]: https://github.com/google/cpu_features/actions/workflows/amd64_FreeBSD.yml
-[img_1a]: https://img.shields.io/github/workflow/status/google/cpu_features/amd64%20FreeBSD/main
-[lnk_2a]: https://github.com/google/cpu_features/actions/workflows/amd64_Linux.yml
-[img_2a]: https://img.shields.io/github/workflow/status/google/cpu_features/amd64%20Linux/main
-[lnk_3a]: https://github.com/google/cpu_features/actions/workflows/amd64_macOS.yml
-[img_3a]: https://img.shields.io/github/workflow/status/google/cpu_features/amd64%20macOS/main
-[lnk_4a]: https://github.com/google/cpu_features/actions/workflows/amd64_Windows.yml
-[img_4a]: https://img.shields.io/github/workflow/status/google/cpu_features/amd64%20Windows/main
-[lnk_2b]: https://github.com/google/cpu_features/actions/workflows/aarch64_Linux.yml
-[img_2b]: https://img.shields.io/github/workflow/status/google/cpu_features/aarch64%20Linux/main
-[lnk_2c]: https://github.com/google/cpu_features/actions/workflows/arm_Linux.yml
-[img_2c]: https://img.shields.io/github/workflow/status/google/cpu_features/arm%20Linux/main
-[lnk_2d]: https://github.com/google/cpu_features/actions/workflows/mips_Linux.yml
-[img_2d]: https://img.shields.io/github/workflow/status/google/cpu_features/mips%20Linux/main
+[lnk_1a]: https://github.com/google/cpu_features/actions/workflows/amd64_freebsd_cmake.yml
+[img_1a]: https://img.shields.io/github/workflow/status/google/cpu_features/amd64%20FreeBSD%20CMake/main
+[lnk_2a]: https://github.com/google/cpu_features/actions/workflows/amd64_linux_cmake.yml
+[img_2a]: https://img.shields.io/github/workflow/status/google/cpu_features/amd64%20Linux%20CMake/main
+[lnk_3a]: https://github.com/google/cpu_features/actions/workflows/amd64_macos_cmake.yml
+[img_3a]: https://img.shields.io/github/workflow/status/google/cpu_features/amd64%20MacOS%20CMake/main
+[lnk_4a]: https://github.com/google/cpu_features/actions/workflows/amd64_windows_cmake.yml
+[img_4a]: https://img.shields.io/github/workflow/status/google/cpu_features/amd64%20Windows%20CMake/main
+[lnk_2b]: https://github.com/google/cpu_features/actions/workflows/aarch64_linux_cmake.yml
+[img_2b]: https://img.shields.io/github/workflow/status/google/cpu_features/AArch64%20Linux%20CMake/main
+[lnk_2c]: https://github.com/google/cpu_features/actions/workflows/arm_linux_cmake.yml
+[img_2c]: https://img.shields.io/github/workflow/status/google/cpu_features/ARM%20Linux%20CMake/main
+[lnk_2d]: https://github.com/google/cpu_features/actions/workflows/mips_linux_cmake.yml
+[img_2d]: https://img.shields.io/github/workflow/status/google/cpu_features/MIPS%20Linux%20CMake/main
## Makefile/Docker testing
To test the build on various distro, we are using docker containers and a Makefile for orchestration.
diff --git a/ci/doc/docker.dot b/cmake/ci/doc/docker.dot
index a00ef1f..a00ef1f 100644
--- a/ci/doc/docker.dot
+++ b/cmake/ci/doc/docker.dot
diff --git a/ci/doc/docker.svg b/cmake/ci/doc/docker.svg
index bd9bd6d..bd9bd6d 100644
--- a/ci/doc/docker.svg
+++ b/cmake/ci/doc/docker.svg
diff --git a/ci/doc/generate_image.sh b/cmake/ci/doc/generate_image.sh
index 15f1774..15f1774 100755
--- a/ci/doc/generate_image.sh
+++ b/cmake/ci/doc/generate_image.sh
diff --git a/ci/docker/amd64/Dockerfile b/cmake/ci/docker/amd64/Dockerfile
index 9b25e28..2cc3270 100644
--- a/ci/docker/amd64/Dockerfile
+++ b/cmake/ci/docker/amd64/Dockerfile
@@ -38,7 +38,7 @@ COPY --from=build /usr/local /usr/local/
FROM install_env AS install_devel
WORKDIR /home/sample
-COPY ci/sample .
+COPY cmake/ci/sample .
FROM install_devel AS install_build
RUN cmake -S. -Bbuild
diff --git a/ci/docker/toolchain/Dockerfile b/cmake/ci/docker/toolchain/Dockerfile
index 1bf25ed..1bf25ed 100644
--- a/ci/docker/toolchain/Dockerfile
+++ b/cmake/ci/docker/toolchain/Dockerfile
diff --git a/ci/sample/CMakeLists.txt b/cmake/ci/sample/CMakeLists.txt
index b60e92f..b60e92f 100644
--- a/ci/sample/CMakeLists.txt
+++ b/cmake/ci/sample/CMakeLists.txt
diff --git a/ci/sample/main.cpp b/cmake/ci/sample/main.cpp
index 45ec651..45ec651 100644
--- a/ci/sample/main.cpp
+++ b/cmake/ci/sample/main.cpp
diff --git a/ci/vagrant/freebsd/Vagrantfile b/cmake/ci/vagrant/freebsd/Vagrantfile
index 7ef7bfa..421dc88 100644
--- a/ci/vagrant/freebsd/Vagrantfile
+++ b/cmake/ci/vagrant/freebsd/Vagrantfile
@@ -49,11 +49,11 @@ Vagrant.configure("2") do |config|
#config.vm.synced_folder "../../..", "/home/vagrant/project"
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
- config.vm.provision "file", source: "../../../CMakeLists.txt", destination: "$HOME/project/"
- config.vm.provision "file", source: "../../../cmake", destination: "$HOME/project/"
- config.vm.provision "file", source: "../../../include", destination: "$HOME/project/"
- config.vm.provision "file", source: "../../../src", destination: "$HOME/project/"
- config.vm.provision "file", source: "../../../test", destination: "$HOME/project/"
+ config.vm.provision "file", source: "../../../../CMakeLists.txt", destination: "$HOME/project/"
+ config.vm.provision "file", source: "../../../../cmake", destination: "$HOME/project/"
+ config.vm.provision "file", source: "../../../../include", destination: "$HOME/project/"
+ config.vm.provision "file", source: "../../../../src", destination: "$HOME/project/"
+ config.vm.provision "file", source: "../../../../test", destination: "$HOME/project/"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
diff --git a/scripts/generate_badges.d b/scripts/generate_badges.d
index 9e0cfea..8eee1fd 100644
--- a/scripts/generate_badges.d
+++ b/scripts/generate_badges.d
@@ -22,36 +22,6 @@ enum Os
Windows
}
-string getWorkflowName(Cpu cpu)
-{
- final switch (cpu)
- {
- case Cpu.amd64:
- return "amd64";
- case Cpu.AArch64:
- return "aarch64";
- case Cpu.ARM:
- return "arm";
- case Cpu.MIPS:
- return "mips";
- }
-}
-
-string getWorkflowName(Os os)
-{
- final switch (os)
- {
- case Os.FreeBSD:
- return "FreeBSD";
- case Os.Linux:
- return "Linux";
- case Os.MacOS:
- return "macOS";
- case Os.Windows:
- return "Windows";
- }
-}
-
struct Configuration
{
const:
@@ -130,10 +100,13 @@ void main()
.map!(t => Configuration(t[0], t[1]))
.filter!(conf => !conf.disabled)
.each!((conf) {
- const cpu_name = getWorkflowName(conf.cpu);
- const os_name = getWorkflowName(conf.os);
- writefln("%s: https://github.com/google/cpu_features/actions/workflows/%s_%s.yml", conf.link_ref, cpu_name, os_name);
- writefln("%s: https://img.shields.io/github/workflow/status/google/cpu_features/%s%%20%s/main", conf
- .image_ref, cpu_name, os_name);
+ import std.uni : toLower;
+ import std.uri : encode;
+
+ const filename = toLower(format("%s_%s_%s.yml", conf.cpu, conf.os, "cmake"));
+ writefln("%s: https://github.com/google/cpu_features/actions/workflows/%s", conf.link_ref, filename);
+
+ const worflow_name = encode(format("%s %s %s", conf.cpu, conf.os, "CMake"));
+ writefln("%s: https://img.shields.io/github/workflow/status/google/cpu_features/%s/main", conf.image_ref, worflow_name);
});
}