Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set CC and CXX environment variables using 'env' in workflows. #18425

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

ScottTodd
Copy link
Member

Follow-up to #18422 (comment) and #18421 (comment).

This style is more compact, but it does remove some context that could be useful - that the CC/CXX environment variables are for the build toolchain and are related to CMake and Ninja.

The 'runtime' workflow is cross platform and also sets this conditionally:

- name: (Linux) Install requirements
if: contains(matrix.name, 'ubuntu')
run: |
sudo apt update
sudo apt install -y ninja-build
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: (Windows) Configure MSVC
if: contains(matrix.name, 'windows')
uses: ilammy/msvc-dev-cmd@v1.13.0
- name: (macOS) Install requirements
if: contains(matrix.name, 'macos')
run: brew install ninja ccache coreutils bash
See https://github.com/iree-org/iree-template-runtime-cmake/blob/main/.github/workflows/build-and-test.yml for a more comprehensive example where we also branch on gcc and clang in the same matrix.

@ScottTodd ScottTodd added the infrastructure Relating to build systems, CI, or testing label Sep 3, 2024
@ScottTodd ScottTodd merged commit 831899f into iree-org:main Sep 4, 2024
37 checks passed
@ScottTodd ScottTodd deleted the infra-clang-env branch September 4, 2024 15:32
IanWood1 pushed a commit to IanWood1/iree that referenced this pull request Sep 8, 2024
…org#18425)

Follow-up to
iree-org#18422 (comment) and
iree-org#18421 (comment).

This style is more compact, but it does remove some context that could
be useful - that the CC/CXX environment variables are for the build
toolchain and are related to CMake and Ninja.

The 'runtime' workflow is cross platform and also sets this
conditionally:
https://github.com/iree-org/iree/blob/1124be8025995b64804e9f02b62a0354b25dfb2b/.github/workflows/ci.yml#L112-L124
See
https://github.com/iree-org/iree-template-runtime-cmake/blob/main/.github/workflows/build-and-test.yml
for a more comprehensive example where we also branch on gcc and clang
in the same matrix.
josemonsalve2 pushed a commit to josemonsalve2/iree that referenced this pull request Sep 14, 2024
…org#18425)

Follow-up to
iree-org#18422 (comment) and
iree-org#18421 (comment).

This style is more compact, but it does remove some context that could
be useful - that the CC/CXX environment variables are for the build
toolchain and are related to CMake and Ninja.

The 'runtime' workflow is cross platform and also sets this
conditionally:
https://github.com/iree-org/iree/blob/1124be8025995b64804e9f02b62a0354b25dfb2b/.github/workflows/ci.yml#L112-L124
See
https://github.com/iree-org/iree-template-runtime-cmake/blob/main/.github/workflows/build-and-test.yml
for a more comprehensive example where we also branch on gcc and clang
in the same matrix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Relating to build systems, CI, or testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants