Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 61 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ jobs:
outputs:
enabled: ${{ steps.check-ref.outputs.enabled }}${{ steps.skip-if-redundant.outputs.enabled }}
skip_concurrent: ${{ steps.check-ref.outputs.skip_concurrent }}
rust_version_minimum: 1.63.0
rust_version_windows: 1.78.0
rust_version_musl: 1.72.0
## the rust target is inferred by rustup unless specified
rust_target_windows_make: x86_64-pc-windows-gnu
rust_target_windows_meson: x86_64-pc-windows-msvc
rust_target_32bit_linux: i686-unknown-linux-gnu
steps:
- name: try to clone ci-config branch
run: |
Expand Down Expand Up @@ -108,12 +115,28 @@ jobs:
needs: ci-config
if: needs.ci-config.outputs.enabled == 'yes'
runs-on: windows-latest
env:
CARGO_HOME: "/c/Users/runneradmin/.cargo"
concurrency:
group: windows-build-${{ github.ref }}
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
steps:
- uses: actions/checkout@v5
- uses: git-for-windows/setup-git-for-windows-sdk@v1
with:
flavor: full
- name: Install rustup via github actions
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: false
- name: Install Rust toolchain
shell: bash
env:
RUST_VERSION: ${{ needs.ci-config.outputs.rust_version_windows }}
RUST_TARGET: ${{ needs.ci-config.outputs.rust_target_windows_make }}
run: ci/install-rust-toolchain.sh
- name: build
shell: bash
env:
Expand Down Expand Up @@ -254,12 +277,26 @@ jobs:
needs: ci-config
if: needs.ci-config.outputs.enabled == 'yes'
runs-on: windows-latest
env:
CARGO_HOME: "/c/Users/runneradmin/.cargo"
concurrency:
group: windows-meson-build-${{ github.ref }}
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
- name: Install rustup via github actions
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: false
- name: Install Rust toolchain
shell: bash
env:
RUST_VERSION: ${{ needs.ci-config.outputs.rust_version_windows }}
RUST_TARGET: ${{ needs.ci-config.outputs.rust_target_windows_meson }}
run: ci/install-rust-toolchain.sh
- name: Set up dependencies
shell: pwsh
run: pip install meson ninja
Expand Down Expand Up @@ -329,11 +366,24 @@ jobs:
jobname: ${{matrix.vector.jobname}}
CI_JOB_IMAGE: ${{matrix.vector.pool}}
TEST_OUTPUT_DIRECTORY: ${{github.workspace}}/t
CARGO_HOME: "/Users/runner/.cargo"
runs-on: ${{matrix.vector.pool}}
steps:
- uses: actions/checkout@v5
- run: ci/install-dependencies.sh
- run: ci/run-build-and-tests.sh
- name: Install rustup via github actions
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: false
- name: Install Rust toolchain
shell: bash
env:
RUST_VERSION: ${{ needs.ci-config.outputs.rust_version_minimum }}
run: ci/install-rust-toolchain.sh
- name: Run build and tests
run: ci/run-build-and-tests.sh
- name: print test failures
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
run: ci/print-test-failures.sh
Expand Down Expand Up @@ -395,9 +445,11 @@ jobs:
cc: gcc
- jobname: linux-musl-meson
image: alpine:latest
rust_version_override: ${{ needs.ci-config.outputs.rust_version_musl }}
# Supported until 2025-04-02.
- jobname: linux32
image: i386/ubuntu:focal
rust_target_override: ${{ needs.ci-config.outputs.rust_target_32bit_linux }}
# A RHEL 8 compatible distro. Supported until 2029-05-31.
- jobname: almalinux-8
image: almalinux:8
Expand All @@ -409,6 +461,7 @@ jobs:
CC: ${{matrix.vector.cc}}
CI_JOB_IMAGE: ${{matrix.vector.image}}
CUSTOM_PATH: /custom
CARGO_HOME: /home/builder/.cargo
runs-on: ubuntu-latest
container: ${{matrix.vector.image}}
steps:
Expand All @@ -433,6 +486,13 @@ jobs:
- run: ci/install-dependencies.sh
- run: useradd builder --create-home
- run: chown -R builder .
- name: Install rustup via script
run: sudo --preserve-env --set-home --user=builder ci/install-rustup.sh
- name: Install Rust toolchain
env:
RUST_VERSION: ${{ matrix.vector.rust_version_override || needs.ci-config.outputs.rust_version_minimum }}
RUST_TARGET: ${{ matrix.vector.rust_target_override || '' }}
run: sudo --preserve-env --set-home --user=builder ci/install-rust-toolchain.sh
- run: sudo --preserve-env --set-home --user=builder ci/run-build-and-tests.sh
- name: print test failures
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,4 @@ Release/
/contrib/buildsystems/out
/contrib/libgit-rs/target
/contrib/libgit-sys/target
/generated/
17 changes: 7 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
[package]
name = "gitcore"
version = "0.1.0"
edition = "2018"
rust-version = "1.49.0"

[lib]
crate-type = ["staticlib"]

[dependencies]
[workspace]
members = [
"rust/generate-headers",
"rust/gitcore",
"rust/link-with-c",
]
resolver = "2"
Loading
Loading