mirror of
https://github.com/google/cpu_features.git
synced 2025-04-28 07:23:37 +02:00
Move ci folder and make naming more consistent (#233)
This commit is contained in:
parent
70ca4fd06f
commit
c219c921c5
@ -1,8 +1,8 @@
|
|||||||
# Project Files unneeded by docker
|
# Project Files unneeded by docker
|
||||||
ci/Makefile
|
cmake/ci/Makefile
|
||||||
ci/docker
|
cmake/ci/docker
|
||||||
ci/doc
|
cmake/ci/doc
|
||||||
ci/cache
|
cmake/ci/cache
|
||||||
.git
|
.git
|
||||||
.gitignore
|
.gitignore
|
||||||
.github
|
.github
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name: aarch64 Linux
|
name: AArch64 Linux CMake
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -9,7 +9,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Building using the github runner environement directly.
|
# Building using the github runner environement directly.
|
||||||
aarch64:
|
make:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -23,6 +23,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make --directory=ci ${TARGET}_build
|
run: make --directory=cmake/ci ${TARGET}_build
|
||||||
- name: Test
|
- name: Test
|
||||||
run: make --directory=ci ${TARGET}_test
|
run: make --directory=cmake/ci ${TARGET}_test
|
@ -1,4 +1,4 @@
|
|||||||
name: amd64 FreeBSD
|
name: amd64 FreeBSD CMake
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -10,7 +10,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
# Only MacOS hosted runner provides virtualisation with vagrant/virtualbox installed.
|
# Only MacOS hosted runner provides virtualisation with vagrant/virtualbox installed.
|
||||||
# see: https://github.com/actions/virtual-environments/tree/main/images/macos
|
# see: https://github.com/actions/virtual-environments/tree/main/images/macos
|
||||||
freebsd:
|
make:
|
||||||
runs-on: macos-10.15
|
runs-on: macos-10.15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -19,4 +19,4 @@ jobs:
|
|||||||
- name: VirtualBox version
|
- name: VirtualBox version
|
||||||
run: virtualbox -h
|
run: virtualbox -h
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cd ci/vagrant/freebsd && vagrant up
|
run: cd cmake/ci/vagrant/freebsd && vagrant up
|
31
.github/workflows/amd64_linux.yml
vendored
31
.github/workflows/amd64_linux.yml
vendored
@ -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
|
|
@ -1,4 +1,4 @@
|
|||||||
name: amd64 Bazel Linux
|
name: amd64 Linux Bazel
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
31
.github/workflows/amd64_linux_cmake.yml
vendored
Normal file
31
.github/workflows/amd64_linux_cmake.yml
vendored
Normal file
@ -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
|
@ -1,4 +1,4 @@
|
|||||||
name: amd64 macOS
|
name: amd64 MacOS CMake
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
@ -1,4 +1,4 @@
|
|||||||
name: amd64 Windows
|
name: amd64 Windows CMake
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
@ -1,4 +1,4 @@
|
|||||||
name: arm Linux
|
name: ARM Linux CMake
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -9,7 +9,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Building using the github runner environement directly.
|
# Building using the github runner environement directly.
|
||||||
arm:
|
make:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -26,6 +26,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make --directory=ci ${TARGET}_build
|
run: make --directory=cmake/ci ${TARGET}_build
|
||||||
- name: Test
|
- name: Test
|
||||||
run: make --directory=ci ${TARGET}_test
|
run: make --directory=cmake/ci ${TARGET}_test
|
@ -1,4 +1,4 @@
|
|||||||
name: mips Linux
|
name: MIPS Linux CMake
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -9,7 +9,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Building using the github runner environement directly.
|
# Building using the github runner environement directly.
|
||||||
mips:
|
make:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -25,6 +25,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make --directory=ci ${TARGET}_build
|
run: make --directory=cmake/ci ${TARGET}_build
|
||||||
- name: Test
|
- name: Test
|
||||||
run: make --directory=ci ${TARGET}_test
|
run: make --directory=cmake/ci ${TARGET}_test
|
@ -113,7 +113,7 @@ $(targets_amd64): amd64_%: docker/amd64/Dockerfile
|
|||||||
--tag ${IMAGE}:amd64_$* \
|
--tag ${IMAGE}:amd64_$* \
|
||||||
--target=$* \
|
--target=$* \
|
||||||
-f $< \
|
-f $< \
|
||||||
..
|
../..
|
||||||
|
|
||||||
#$(info Create targets: save_amd64 $(addprefix save_amd64_, $(STAGES)) (debug).)
|
#$(info Create targets: save_amd64 $(addprefix save_amd64_, $(STAGES)) (debug).)
|
||||||
save_targets_amd64 = $(addprefix save_amd64_, $(STAGES))
|
save_targets_amd64 = $(addprefix save_amd64_, $(STAGES))
|
||||||
@ -160,7 +160,7 @@ $$(targets_toolchain_$1): %_$1: docker/toolchain/Dockerfile
|
|||||||
--build-arg TARGET=$$* \
|
--build-arg TARGET=$$* \
|
||||||
--target=$1 \
|
--target=$1 \
|
||||||
-f $$< \
|
-f $$< \
|
||||||
..
|
../..
|
||||||
|
|
||||||
#$$(info Create targets: save_toolchain_$1 $(addprefix save_, $(addsuffix _$1, $(TOOLCHAIN_TARGETS))) (debug).)
|
#$$(info Create targets: save_toolchain_$1 $(addprefix save_, $(addsuffix _$1, $(TOOLCHAIN_TARGETS))) (debug).)
|
||||||
save_targets_toolchain_$1 = $(addprefix save_, $(addsuffix _$1, $(TOOLCHAIN_TARGETS)))
|
save_targets_toolchain_$1 = $(addprefix save_, $(addsuffix _$1, $(TOOLCHAIN_TARGETS)))
|
@ -7,20 +7,20 @@
|
|||||||
| Windows | [![][img_4a]][lnk_4a] | ![][img_na] | ![][img_na] | ![][img_na] |
|
| Windows | [![][img_4a]][lnk_4a] | ![][img_na] | ![][img_na] | ![][img_na] |
|
||||||
|
|
||||||
[img_na]: https://img.shields.io/badge/build-N%2FA-lightgrey
|
[img_na]: https://img.shields.io/badge/build-N%2FA-lightgrey
|
||||||
[lnk_1a]: https://github.com/google/cpu_features/actions/workflows/amd64_FreeBSD.yml
|
[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/main
|
[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.yml
|
[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/main
|
[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.yml
|
[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/main
|
[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.yml
|
[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/main
|
[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.yml
|
[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/main
|
[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.yml
|
[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/main
|
[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.yml
|
[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/main
|
[img_2d]: https://img.shields.io/github/workflow/status/google/cpu_features/MIPS%20Linux%20CMake/main
|
||||||
|
|
||||||
## Makefile/Docker testing
|
## Makefile/Docker testing
|
||||||
To test the build on various distro, we are using docker containers and a Makefile for orchestration.
|
To test the build on various distro, we are using docker containers and a Makefile for orchestration.
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
@ -38,7 +38,7 @@ COPY --from=build /usr/local /usr/local/
|
|||||||
|
|
||||||
FROM install_env AS install_devel
|
FROM install_env AS install_devel
|
||||||
WORKDIR /home/sample
|
WORKDIR /home/sample
|
||||||
COPY ci/sample .
|
COPY cmake/ci/sample .
|
||||||
|
|
||||||
FROM install_devel AS install_build
|
FROM install_devel AS install_build
|
||||||
RUN cmake -S. -Bbuild
|
RUN cmake -S. -Bbuild
|
@ -49,11 +49,11 @@ Vagrant.configure("2") do |config|
|
|||||||
#config.vm.synced_folder "../../..", "/home/vagrant/project"
|
#config.vm.synced_folder "../../..", "/home/vagrant/project"
|
||||||
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
|
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: "../../../../CMakeLists.txt", destination: "$HOME/project/"
|
||||||
config.vm.provision "file", source: "../../../cmake", 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: "../../../../include", destination: "$HOME/project/"
|
||||||
config.vm.provision "file", source: "../../../src", 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: "../../../../test", destination: "$HOME/project/"
|
||||||
|
|
||||||
# Provider-specific configuration so you can fine-tune various
|
# Provider-specific configuration so you can fine-tune various
|
||||||
# backing providers for Vagrant. These expose provider-specific options.
|
# backing providers for Vagrant. These expose provider-specific options.
|
@ -22,36 +22,6 @@ enum Os
|
|||||||
Windows
|
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
|
struct Configuration
|
||||||
{
|
{
|
||||||
const:
|
const:
|
||||||
@ -130,10 +100,13 @@ void main()
|
|||||||
.map!(t => Configuration(t[0], t[1]))
|
.map!(t => Configuration(t[0], t[1]))
|
||||||
.filter!(conf => !conf.disabled)
|
.filter!(conf => !conf.disabled)
|
||||||
.each!((conf) {
|
.each!((conf) {
|
||||||
const cpu_name = getWorkflowName(conf.cpu);
|
import std.uni : toLower;
|
||||||
const os_name = getWorkflowName(conf.os);
|
import std.uri : encode;
|
||||||
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
|
const filename = toLower(format("%s_%s_%s.yml", conf.cpu, conf.os, "cmake"));
|
||||||
.image_ref, cpu_name, os_name);
|
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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user