-
Notifications
You must be signed in to change notification settings - Fork 13
Update ci.yml #63
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
Closed
Closed
Update ci.yml #63
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b3f7978
Update ci.yml
johnnynunez aa83128
Update CMakeLists.txt
johnnynunez bc0d13f
Update manylinux-build.sh
johnnynunez 3e3f3f5
Update ci.yml
johnnynunez 044f0be
Update ci.yml
johnnynunez 506cc3d
Update ci.yml
johnnynunez 43b8e33
Update manylinux-build.sh
johnnynunez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,72 +1,116 @@ | ||
| name: CI | ||
| name: Multi-Arch CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| branches: ["master"] | ||
| pull_request: | ||
| branches: | ||
| - master | ||
| branches: ["master"] | ||
|
|
||
| jobs: | ||
| build: | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-22.04, macos-12, macos-14, windows-2022] | ||
| build: | ||
| name: Build (${{ matrix.os }} - ${{ matrix.arch }}) | ||
| runs-on: ${{ matrix.runs-on }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| # Linux | ||
| - os: ubuntu-22.04 | ||
| arch: x86_64 | ||
| runs-on: ubuntu-22.04 | ||
| - os: ubuntu-22.04 | ||
| arch: aarch64 | ||
| runs-on: ubuntu-22.04-arm | ||
| - os: ubuntu-24.04 | ||
| arch: x86_64 | ||
| runs-on: ubuntu-24.04 | ||
| - os: ubuntu-24.04 | ||
| arch: aarch64 | ||
| runs-on: ubuntu-24.04-arm | ||
| # macOS | ||
| - os: macos-13 | ||
| arch: x86_64 | ||
| runs-on: macos-13 | ||
| - os: macos-15 | ||
| arch: arm64 | ||
| runs-on: macos-15 | ||
| # Windows | ||
| - os: windows-2022 | ||
| arch: x86_64 | ||
| runs-on: windows-2022 | ||
| - os: windows-2025 | ||
| arch: x86_64 | ||
| runs-on: windows-2025 | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| ######################### | ||
| # Dependencies Installation | ||
| ######################### | ||
| - name: Install LLVM and Dependencies (Linux) | ||
| if: runner.os == 'Linux' | ||
| run: | | ||
| sudo apt-get update | ||
| wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | ||
| sudo add-apt-repository -y "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-18 main" | ||
| sudo apt-get update | ||
| sudo apt-get install -y curl clang-18 lld-18 llvm-18-dev libclang-18-dev ninja-build cmake libxml2-dev | ||
| - name: Install LLVM and Dependencies (macOS) | ||
| if: runner.os == 'macos' | ||
| run: | | ||
| brew update | ||
| brew install curl llvm libxml2 cmake ninja | ||
| # Add LLVM’s bin directory to PATH so that CMake and tools can find LLVM 18. | ||
| echo "$(brew --prefix llvm)/bin" >> $GITHUB_PATH | ||
| - name: Install LLVM and Clang (Windows) | ||
| if: runner.os == 'Windows' | ||
| shell: pwsh | ||
| run: | | ||
| choco install curl llvm cmake -y | ||
| - name: 🧳 Setup MSVC (Windows) | ||
| if: runner.os == 'Windows' | ||
| uses: microsoft/setup-msbuild@v2 | ||
| # Configure the Project with CMake | ||
| ######################### | ||
| - name: Configure CMake (Non-Windows) | ||
| if: runner.os != 'Windows' | ||
| run: | | ||
| cmake -B build -S . -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=bin | ||
| - name: Configure CMake (Windows) | ||
| if: runner.os == 'Windows' | ||
| shell: cmd | ||
| run: | | ||
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | ||
| cmake -B build -S . -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=bin | ||
| ninja -C build | ||
| ######################### | ||
| # Build and Test | ||
| ######################### | ||
| - name: Build Project | ||
| if: runner.os != 'Windows' | ||
| run: ninja -C build | ||
|
|
||
| - name: Install ninja | ||
| shell: bash | ||
| run: | | ||
| if [[ "${{ runner.os }}" == "macOS" ]]; then | ||
| brew install ninja | ||
| elif [[ "${{ runner.os }}" == "Linux" ]]; then | ||
| sudo apt-get -y update | ||
| sudo apt-get -y install ninja-build | ||
| fi | ||
| - name: Run Tests | ||
| run: ctest --test-dir build --output-on-failure | ||
|
|
||
| - name: Build | ||
| if: matrix.os != 'windows-2022' | ||
| run: | | ||
| cmake -Bbuild -S. -GNinja | ||
| ninja -Cbuild | ||
|
|
||
| - name: Build | ||
| if: matrix.os == 'windows-2022' | ||
| shell: cmd | ||
| run: | | ||
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | ||
| cmake -Bbuild -S. -GNinja | ||
| ninja -Cbuild | ||
|
|
||
| - name: Test | ||
| run: | | ||
| cd build/castxml-prefix/src/castxml-build | ||
| ctest --output-on-failure | ||
|
|
||
| - name: Create archive for Windows | ||
| if: matrix.os == 'windows-2022' | ||
| shell: cmd | ||
| run: | | ||
| cd build | ||
| 7z a castxml-${{ matrix.os }}.zip castxml | ||
| move castxml-${{ matrix.os }}.zip .. | ||
|
|
||
| - name: Create archive for macOS and Ubuntu | ||
| if: matrix.os != 'windows-2022' | ||
| shell: bash | ||
| run: | | ||
| cd build | ||
| tar cvf castxml-${{ matrix.os }}.tar castxml | ||
| gzip -9 castxml-${{ matrix.os }}.tar | ||
| mv castxml-${{ matrix.os }}.tar.gz .. | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.os }}-archive | ||
| path: ./castxml-${{ matrix.os }}.* | ||
| ######################### | ||
| # Artifact Packaging | ||
| ######################### | ||
| - name: Create Artifact (Linux/macOS) | ||
| if: runner.os != 'Windows' | ||
| run: | | ||
| cd build/bin | ||
| tar czvf ../../castxml-${{ matrix.os }}-${{ matrix.arch }}.tar.gz castxml | ||
| - name: Create Artifact (Windows) | ||
| if: runner.os == 'Windows' | ||
| shell: cmd | ||
| run: | | ||
| cd build\bin | ||
| 7z a ..\..\castxml-${{ matrix.os }}-${{ matrix.arch }}.zip castxml.exe | ||
| - name: Upload Artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: castxml-${{ matrix.os }}-${{ matrix.arch }} | ||
| path: castxml-${{ matrix.os }}-${{ matrix.arch }}.* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.