Skip to content

Commit

Permalink
Merge pull request #8 from sensuikan1973/use_intel_compiler
Browse files Browse the repository at this point in the history
use Intel Compiler icc
  • Loading branch information
sensuikan1973 authored Jan 11, 2021
2 parents 0e6fe05 + 4bafa34 commit 5f41ec7
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 16 deletions.
51 changes: 43 additions & 8 deletions .github/workflows/publish_artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,40 @@ jobs:
env: # See: https://docs.github.com/ja/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idenv
OUTPUT_DIR: edax_runner-bin
runs-on: ${{ matrix.os }}
timeout-minutes: 5
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
include: # See: https://docs.github.com/ja/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#using-environment-variables-in-a-matrix
# NOTE: Intel Components variables are based on https://github.com/oneapi-src/oneapi-ci/blob/master/.github/workflows/build_all.yml
# See: https://github.com/oneapi-src/oneapi-ci/issues/31
- os: ubuntu-latest
edax-runner_bin_name: edax_runner-linux
edax_build_command: make build ARCH=x64-modern COMP=gcc OS=linux
edax_build_command: make build ARCH=x64-modern COMP=icc OS=linux
edax_bin_name: lEdax-x64-modern
intel_components_install_script: oneapi-ci/scripts/install_linux.sh
intel_cpp_components: intel.oneapi.lin.dpcpp-cpp-compiler-pro
hrckit_url: https://registrationcenter-download.intel.com/akdlm/irc_nas/17427/l_HPCKit_p_2021.1.0.2684_offline.sh
intel_cpp_components_cache_path: /opt/intel/oneapi/compiler
prepare_command_for_cache_restore_of_cpp_components: ''
- os: windows-latest
edax-runner_bin_name: edax_runner-windows.exe
edax_build_command: make build ARCH=x64 COMP=gcc OS=windows
edax_build_command: make build ARCH=x64 COMP=icc OS=windows
edax_bin_name: wEdax-x64-modern.exe
intel_components_install_script: oneapi-ci/scripts/install_windows.bat
intel_cpp_components: intel.oneapi.win.cpp-compiler
hrckit_url: https://registrationcenter-download.intel.com/akdlm/irc_nas/17392/w_HPCKit_p_2021.1.0.2682_offline.exe
intel_cpp_components_cache_path: C:\Program Files (x86)\Intel\oneAPI\compiler
prepare_command_for_cache_restore_of_cpp_components: ''
- os: macOS-latest
edax-runner_bin_name: edax_runner-mac
edax_build_command: make build ARCH=x64-modern COMP=gcc OS=osx
edax_build_command: make build ARCH=x64-modern COMP=icc OS=osx
edax_bin_name: mEdax
intel_components_install_script: oneapi-ci/scripts/install_macos.sh
intel_cpp_components: intel.oneapi.mac.cpp-compiler
hrckit_url: https://registrationcenter-download.intel.com/akdlm/irc_nas/17398/m_HPCKit_p_2021.1.0.2681_offline.dmg
intel_cpp_components_cache_path: /opt/intel/oneapi
prepare_command_for_cache_restore_of_cpp_components: sudo mkdir -p /opt/intel && sudo chown $USER /opt/intel

steps:
- uses: actions/checkout@v2
Expand All @@ -49,15 +66,33 @@ jobs:
path: edax-reversi
key: ${{ runner.os }}-edax-reversi-${{ hashFiles('scripts/build_edax.sh') }}

- name: build edax-runner
# setup Intel Compiler icc
- uses: actions/checkout@v2
with:
repository: oneapi-src/oneapi-ci
path: oneapi-ci
- name: prepare for cache restore
run: ${{ matrix.prepare_command_for_cache_restore_of_cpp_components }}
- name: cache intel components
id: cache-intel-components
uses: actions/cache@v2
with:
path: /opt/intel/oneapi
key: install-${{ matrix.hrckit_url }}-${{ matrix.intel_cpp_components }}
- name: install
if: steps.cache-intel-components.outputs.cache-hit != 'true'
run: ${{ matrix.intel_components_install_script }} ${{ matrix.hrckit_url }} ${{ matrix.intel_cpp_components }}

- name: build edax-reversi
env:
dst: ${{ env.OUTPUT_DIR }}
bin_name: ${{ matrix.edax-runner_bin_name }}
edax_build_command: ${{ matrix.edax_build_command }}
edax_bin_name: ${{ matrix.edax_bin_name }}
run: |-
sh scripts/build_edax.sh
dart2native bin/edax_runner.dart -v -o ${{ env.dst }}/${{ env.bin_name }}
run: sh scripts/build_edax.sh

- name: build edax-runner
run: dart2native bin/edax_runner.dart -v -o ${{ env.OUTPUT_DIR }}/${{ matrix.edax-runner_bin_name }}

# See: https://github.com/actions/upload-artifact/issues/38
# Workaround: https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files
Expand Down
49 changes: 41 additions & 8 deletions .github/workflows/publish_assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,38 @@ jobs:
env:
OUTPUT_DIR: edax_runner-bin
runs-on: ${{ matrix.os }}
timeout-minutes: 5
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
include:
- os: ubuntu-latest
edax-runner_bin_name: edax_runner-linux
edax_build_command: make build ARCH=x64-modern COMP=gcc OS=linux
edax_build_command: make build ARCH=x64-modern COMP=icc OS=linux
edax_bin_name: lEdax-x64-modern
intel_components_install_script: oneapi-ci/scripts/install_linux.sh
intel_cpp_components: intel.oneapi.lin.dpcpp-cpp-compiler-pro
hrckit_url: https://registrationcenter-download.intel.com/akdlm/irc_nas/17427/l_HPCKit_p_2021.1.0.2684_offline.sh
intel_cpp_components_cache_path: /opt/intel/oneapi/compiler
prepare_command_for_cache_restore_of_cpp_components: ''
- os: windows-latest
edax-runner_bin_name: edax_runner-windows.exe
edax_build_command: make build ARCH=x64 COMP=gcc OS=windows
edax_build_command: make build ARCH=x64 COMP=icc OS=windows
edax_bin_name: wEdax-x64-modern.exe
intel_components_install_script: oneapi-ci/scripts/install_windows.bat
intel_cpp_components: intel.oneapi.win.cpp-compiler
hrckit_url: https://registrationcenter-download.intel.com/akdlm/irc_nas/17392/w_HPCKit_p_2021.1.0.2682_offline.exe
intel_cpp_components_cache_path: C:\Program Files (x86)\Intel\oneAPI\compiler
prepare_command_for_cache_restore_of_cpp_components: ''
- os: macOS-latest
edax-runner_bin_name: edax_runner-mac
edax_build_command: make build ARCH=x64-modern COMP=gcc OS=osx
edax_build_command: make build ARCH=x64-modern COMP=icc OS=osx
edax_bin_name: mEdax
intel_components_install_script: oneapi-ci/scripts/install_macos.sh
intel_cpp_components: intel.oneapi.mac.cpp-compiler
hrckit_url: https://registrationcenter-download.intel.com/akdlm/irc_nas/17398/m_HPCKit_p_2021.1.0.2681_offline.dmg
intel_cpp_components_cache_path: /opt/intel/oneapi
prepare_command_for_cache_restore_of_cpp_components: sudo mkdir -p /opt/intel && sudo chown $USER /opt/intel

steps:
- uses: actions/checkout@v2
Expand All @@ -44,15 +59,33 @@ jobs:
path: edax-reversi
key: ${{ runner.os }}-edax-reversi-${{ hashFiles('scripts/build_edax.sh') }}

- name: build edax-runner
# setup Intel Compiler icc
- uses: actions/checkout@v2
with:
repository: oneapi-src/oneapi-ci
path: oneapi-ci
- name: prepare for cache restore
run: ${{ matrix.prepare_command_for_cache_restore_of_cpp_components }}
- name: cache intel components
id: cache-intel-components
uses: actions/cache@v2
with:
path: /opt/intel/oneapi
key: install-${{ matrix.hrckit_url }}-${{ matrix.intel_cpp_components }}
- name: install
if: steps.cache-intel-components.outputs.cache-hit != 'true'
run: ${{ matrix.intel_components_install_script }} ${{ matrix.hrckit_url }} ${{ matrix.intel_cpp_components }}

- name: build edax-reversi
env:
dst: ${{ env.OUTPUT_DIR }}
bin_name: ${{ matrix.edax-runner_bin_name }}
edax_build_command: ${{ matrix.edax_build_command }}
edax_bin_name: ${{ matrix.edax_bin_name }}
run: |-
sh scripts/build_edax.sh
dart2native bin/edax_runner.dart -v -o ${{ env.dst }}/${{ env.bin_name }}
run: sh scripts/build_edax.sh

- name: build edax-runner
run: dart2native bin/edax_runner.dart -v -o ${{ env.OUTPUT_DIR }}/${{ matrix.edax-runner_bin_name }}

- name: zip files (Windows)
if: runner.os == 'Windows'
Expand Down

0 comments on commit 5f41ec7

Please sign in to comment.