-
Notifications
You must be signed in to change notification settings - Fork 0
👷 Add temporary CI for package builds #1
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| name: 'Setup conan enviorrnement' | ||
| description: 'Compile and run unit tests' | ||
|
|
||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: "Setup Conan Client" | ||
| uses: conan-io/setup-conan@v1 | ||
|
|
||
| - name: "Configure Conan to use libhal's artifactory" | ||
| shell: bash | ||
| run: | | ||
| conan config install https://github.com/libhal/conan-config2.git | ||
| conan hal setup | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: ✅ CI | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| lint: | ||
| uses: libhal/ci/.github/workflows/lint.yml@main | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not use main, use 5.x.y if you want the latest without breaking changes. |
||
| with: | ||
| library: scatter_span | ||
| source_dir: . | ||
| repo: libhal/scatter_span | ||
|
|
||
| ci: | ||
| strategy: | ||
| matrix: | ||
| # TODO: Add second matrix dimension for compilers once GCC supports modules | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Every TODO needs an issue number. We must have some sort of non-code tracking for these.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are missing the arm architectures as well. |
||
| include: | ||
| - os: ubuntu-latest | ||
| os_name: linux | ||
| - os: macos-latest | ||
| os_name: mac | ||
| - os: windows-latest | ||
| os_name: windows | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Conan | ||
| uses: ./.github/actions/configure_conan | ||
|
|
||
| - name: Build and Test | ||
| shell: bash | ||
| run: conan build . -pr:a hal/tc/llvm -pr hal/os/${{ matrix.os_name }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,7 +72,7 @@ def validate(self): | |
| def build_requirements(self): | ||
| self.tool_requires("cmake/[^4.0.0]") | ||
| self.tool_requires("ninja/[^1.3.0]") | ||
| self.tool_requires("llvm-toolchain/[^19.0]") | ||
| self.tool_requires("llvm-toolchain/[^20.0]") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This MUST NOT be in the Conan file. This prevents the usage of GCC. And you cannot depend on both GCC or LLVM. You could with some if statements but then one would need that for every possible toolchain. You may say, "well why bother, if these are the only two" Three reason
Overall, the package should be agnostic to the toolchain package used to build it. |
||
| self.test_requires("boost-ext-ut/2.3.1") | ||
| self.tool_requires("libhal-cmake-util/[^5.0.5]") | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add this dependency when we could also just use pipx install conan? Its the same number of lines but then we just have to worry about pipx for Conan working and not yet another github action which may, at some point stop getting updates. If that happens, which has happened to me in the past, it's a maintenance burden to update all of that. Especially if each repo is getting its own action.