From 0ac866459860b98c2e964069d53d66eec307a80f Mon Sep 17 00:00:00 2001 From: Steffen Date: Thu, 2 Jan 2020 22:03:29 +0000 Subject: [PATCH 1/3] Moved CI to GitHub Actions --- .github/workflows/main.yml | 64 ++++++++++++++++++++++++++++++++++ .github/workflows/nightly.yml | 65 +++++++++++++++++++++++++++++++++++ .travis.yml | 29 ---------------- README.md | 12 ++++--- appveyor.yml | 45 ------------------------ 5 files changed, 136 insertions(+), 79 deletions(-) create mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/nightly.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..4ede28f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,64 @@ +name: julia 1.0/1.3 +on: + - push + - pull_request + +jobs: + testMKLjl: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1.0' + - '1.3' + os: + - ubuntu-latest + - macOS-latest +# - windows-latest + arch: + - x64 + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - run: julia --color=yes --project -e 'using Pkg; Pkg.add(PackageSpec(url=\"https://github.com/JuliaComputing/MKL.jl\")); Pkg.instantiate()' + if: matrix.os == 'windows-latest' + - run: julia --color=yes --project -e 'using Pkg; Pkg.add(PackageSpec(url="https://github.com/JuliaComputing/MKL.jl")); Pkg.instantiate()' + if: matrix.os != 'windows-latest' + - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/julia-runtest@latest + + testAptMKL: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + version: + - '1.0' + - '1.3' + os: + - ubuntu-latest + arch: + - x64 + env: + LD_LIBRARY_PATH: /opt/intel/compilers_and_libraries_2019.4.243/linux/mkl/lib/intel64_lin/ + steps: + - name: Install MKL via apt + run: | + curl https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB > GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB + rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB + sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' + sudo apt-get update + sudo apt-get install -y intel-mkl-64bit-2019.4-070 + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/julia-runtest@latest \ No newline at end of file diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..99f2051 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,65 @@ +name: julia nightly +on: + push: + pull_request: + schedule: + - cron: '1 0 1,15 * *' + +jobs: + testMKLjl: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - 'nightly' + os: + - ubuntu-latest + - macOS-latest +# - windows-latest + arch: + - x64 + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - run: julia --color=yes --project -e 'using Pkg; Pkg.add(PackageSpec(url=\"https://github.com/JuliaComputing/MKL.jl\")); Pkg.instantiate()' + if: matrix.os == 'windows-latest' + - run: julia --color=yes --project -e 'using Pkg; Pkg.add(PackageSpec(url="https://github.com/JuliaComputing/MKL.jl")); Pkg.instantiate()' + if: matrix.os != 'windows-latest' + - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/julia-runtest@latest + + testAptMKL: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + version: + - 'nightly' + os: + - ubuntu-latest + arch: + - x64 + env: + LD_LIBRARY_PATH: /opt/intel/compilers_and_libraries_2019.4.243/linux/mkl/lib/intel64_lin/ + steps: + - name: Install MKL via apt + run: | + curl https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB > GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB + rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB + sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' + sudo apt-get update + sudo apt-get install -y intel-mkl-64bit-2019.4-070 + source /opt/intel/mkl/bin/mklvars.sh intel64 + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/julia-runtest@latest \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3777cbc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: julia - -os: - - linux - - osx - -julia: - - 1.0 - - nightly - -branches: - only: - - master - - TravisTesting - -before_script: - # Every 30 seconds, look for the build log file. If it exists, then - # start watching its contents and printing them to stdout as they - # change. This has two effects: - # 1. it avoids Travis timing out because the build outputs nothing - # 2. it makes it more obvious what part of the build, if any, gets stuck - # - while sleep 30; do tail ./deps/build.log -f ; done & - - julia --project --color=yes --check-bounds=yes -e 'using Pkg; Pkg.add(PackageSpec(url="https://github.com/JuliaComputing/MKL.jl"));' - -script: - # - - export JL_PKG=IntelVectorMath - - julia --color=yes -e "if VERSION < v\"0.7.0-DEV.5183\"; Pkg.clone(pwd()); Pkg.build(\"IntelVectorMath\"); else using Pkg; if VERSION >= v\"1.1.0-rc1\"; Pkg.build(\"IntelVectorMath\"; verbose=true); else Pkg.build(\"IntelVectorMath\"); end; end" - - julia --check-bounds=yes --color=yes -e "if VERSION < v\"0.7.0-DEV.5183\"; Pkg.test(\"IntelVectorMath\", coverage=true); else using Pkg; Pkg.test(coverage=true); end" \ No newline at end of file diff --git a/README.md b/README.md index 385f060..bdb41f9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # IntelVectorMath.jl (formerly VML.jl) -[![Build Status](https://travis-ci.com/JuliaMath/IntelVectorMath.jl.svg?branch=master)](https://travis-ci.com/JuliaMath/IntelVectorMath.jl) -[![Build status](https://ci.appveyor.com/api/projects/status/btdduqfsxux8fhsr?svg=true)](https://ci.appveyor.com/project/Crown421/IntelVectorMath-jl) +![](https://github.com/JuliaMath/VML.jl/workflows/julia%201.0/1.3/badge.svg) +![](https://github.com/JuliaMath/VML.jl/workflows/julia%20nightly/badge.svg) This package provides bindings to the Intel MKL [Vector Mathematics Functions](https://software.intel.com/en-us/node/521751). This is often substantially faster than broadcasting Julia's built-in functions, especially when applying a transcendental function over a large array. @@ -165,14 +165,16 @@ Next steps for this package * [x] Avoiding overloading base and optional overload function * [x] Travis and AppVeyor testing * [x] Adding CIS function -* [ ] Updating Benchmarks +* [x] Move Testing to GitHub Actions +* [x] Add test for using standalone MKL +* [ ] Update Benchmarks * [ ] Add tests for mutating functions -* [ ] Add test for using standalone MKL + ## Advanced IntelVectorMath.jl works via Libdl which loads the relevant shared libraries. Libdl automatically finds the relevant libraries if the location of the binaries has been added to the system search paths. -This already taken care of if you use MKL.jl, but the stand-alone may require you to source `mklvars.sh`. The default command on Mac and Ubuntu is `source /opt/intel/mkl/bin/mklvars.sh intel64`. You may want to add this to your `.bashrc`. +This already taken care of if you use MKL.jl, but the stand-alone may require you to source `mklvars.sh` in the shell you are opening the REPL in. The default command on Mac and Ubuntu is `source /opt/intel/mkl/bin/mklvars.sh intel64`. You may want to add this to your `.bashrc`. Adding a new `*.conf` file in `/etc/ld.so.conf.d` also works, as the `intel-mkl-slim` package in the AUR does automatically. Further, IntelVectorMath.jl uses [CpuId.jl](https://github.com/m-j-w/CpuId.jl) to detect if your processor supports the newer `avx2` instructions, and if not defaults to `libmkl_vml_avx`. If your system does not have AVX this package will currently not work for you. diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index d8a05fe..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,45 +0,0 @@ - -environment: - matrix: - - julia_version: 1 - - julia_version: nightly - -platform: - # - x86 # 32-bit - - x64 # 64-bit - -# # Uncomment the following lines to allow failures on nightly julia -# # (tests will run but not make your overall status red) -matrix: - allow_failures: - - julia_version: nightly - -branches: - only: - - master - # - AppVeyor - -notifications: - - provider: Email - on_build_success: false - on_build_failure: false - on_build_status_changed: false - -install: - - ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1")) - -build_script: - - C:\julia\bin\julia -e "using Pkg; Pkg.add(PackageSpec(url=\"https://github.com/JuliaComputing/MKL.jl\"));" - - echo "%JL_BUILD_SCRIPT%" - - C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%" - -test_script: - - echo "%JL_TEST_SCRIPT%" - - C:\julia\bin\julia -e "%JL_TEST_SCRIPT%" - -# # Uncomment to support code coverage upload. Should only be enabled for packages -# # which would have coverage gaps without running on Windows -# on_success: -# - echo "%JL_CODECOV_SCRIPT%" -# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%" - From 875c85af71aaa526cc71842d2082f8a028e60d55 Mon Sep 17 00:00:00 2001 From: Steffen Date: Thu, 2 Jan 2020 22:14:23 +0000 Subject: [PATCH 2/3] Removed unnecessary test dep, and fixed mistake --- .github/workflows/main.yml | 4 +-- .github/workflows/nightly.yml | 4 +-- Project.toml | 3 +-- test/Manifest.toml | 50 ----------------------------------- test/Project.toml | 1 - 5 files changed, 5 insertions(+), 57 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ede28f..710068b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ jobs: - x64 steps: - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@latest with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} @@ -56,7 +56,7 @@ jobs: sudo apt-get update sudo apt-get install -y intel-mkl-64bit-2019.4-070 - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@latest with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 99f2051..5caa28e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -22,7 +22,7 @@ jobs: - x64 steps: - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@latest with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} @@ -57,7 +57,7 @@ jobs: sudo apt-get install -y intel-mkl-64bit-2019.4-070 source /opt/intel/mkl/bin/mklvars.sh intel64 - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@latest with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} diff --git a/Project.toml b/Project.toml index 2b31f9c..19765c5 100644 --- a/Project.toml +++ b/Project.toml @@ -14,7 +14,6 @@ SpecialFunctions = "0.8" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -MKL = "33e6dc65-8f57-5167-99aa-e5a354878fb2" [targets] -test = ["Test", "MKL"] +test = ["Test"] diff --git a/test/Manifest.toml b/test/Manifest.toml index 636077b..747174a 100644 --- a/test/Manifest.toml +++ b/test/Manifest.toml @@ -15,12 +15,6 @@ git-tree-sha1 = "5b08ed6036d9d3f0ee6369410b830f8873d4024c" uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232" version = "0.5.8" -[[BufferedStreams]] -deps = ["Compat", "Test"] -git-tree-sha1 = "5d55b9486590fdda5905c275bb21ce1f0754020f" -uuid = "e1450e63-4bb3-523b-b2a4-4ffa8c0fd77d" -version = "1.0.0" - [[Compat]] deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] git-tree-sha1 = "ed2c4abadf84c53d9e58510b5fc48912c2336fbb" @@ -45,40 +39,16 @@ uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -[[HTTPClient]] -deps = ["Compat", "LibCURL"] -git-tree-sha1 = "161d5776ae8e585ac0b8c20fb81f17ab755b3671" -uuid = "0862f596-cf2d-50af-8ef4-f2be67dfa83f" -version = "0.2.1" - [[InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -[[LibCURL]] -deps = ["BinaryProvider", "Libdl"] -git-tree-sha1 = "fd5fc15f2a04608fe1435a769dbbfc7959ff1daa" -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.5.2" - -[[LibExpat]] -deps = ["Compat"] -git-tree-sha1 = "fde352ec13479e2f90e57939da2440fb78c5e388" -uuid = "522f3ed2-3f36-55e3-b6df-e94fee9b0c07" -version = "0.5.0" - [[LibGit2]] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" [[Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -[[Libz]] -deps = ["BufferedStreams", "Random", "Test"] -git-tree-sha1 = "d405194ffc0293c3519d4f7251ce51baac9cc871" -uuid = "2ec943e9-cfe8-584d-b93d-64dcb6d567b7" -version = "1.0.0" - [[LinearAlgebra]] deps = ["Libdl"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" @@ -86,14 +56,6 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -[[MKL]] -deps = ["BinaryProvider", "Libdl", "LinearAlgebra", "PackageCompiler", "Test"] -git-tree-sha1 = "22e1063dfa595b24956d7b364c33a4f45e70e247" -repo-rev = "master" -repo-url = "https://github.com/JuliaComputing/MKL.jl.git" -uuid = "33e6dc65-8f57-5167-99aa-e5a354878fb2" -version = "0.0.0" - [[Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" @@ -101,12 +63,6 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" [[Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" -[[PackageCompiler]] -deps = ["Libdl", "Pkg", "REPL", "Serialization", "UUIDs", "WinRPM"] -git-tree-sha1 = "0b5dccd6520dd7072d1d2a7fb22501a98f42e691" -uuid = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" -version = "0.6.4" - [[Pkg]] deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" @@ -166,9 +122,3 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" [[Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[WinRPM]] -deps = ["BinDeps", "Compat", "HTTPClient", "LibExpat", "Libdl", "Libz", "URIParser"] -git-tree-sha1 = "2a889d320f3b77d17c037f295859fe570133cfbf" -uuid = "c17dfb99-b4f7-5aad-8812-456da1ad7187" -version = "0.4.2" diff --git a/test/Project.toml b/test/Project.toml index f0407c7..ceb418a 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,6 +1,5 @@ [deps] CpuId = "adafc99b-e345-5852-983c-f28acb93d879" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -MKL = "33e6dc65-8f57-5167-99aa-e5a354878fb2" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" From 218d59a3ff3cc6a1d582ba2e992f5eb89f519db9 Mon Sep 17 00:00:00 2001 From: Steffen Date: Thu, 2 Jan 2020 22:51:14 +0000 Subject: [PATCH 3/3] Restrict push trigger to master branch --- .github/workflows/main.yml | 6 ++++-- .github/workflows/nightly.yml | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 710068b..53b2929 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,9 @@ name: julia 1.0/1.3 on: - - push - - pull_request + push: + branches: + - master + pull_request: jobs: testMKLjl: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5caa28e..5722a0f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,6 +1,8 @@ name: julia nightly on: push: + branches: + - master pull_request: schedule: - cron: '1 0 1,15 * *'