diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index e9b5e14..2290df7 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -45,17 +45,13 @@ jobs: #- name: Install toolchain # uses: dtolnay/rust-toolchain@stable - # - # uses: actions-rs/toolchain@v1 - # with: - # toolchain: nightly - # #toolchain: ${{ matrix.rust }} - # #target: ${{ matrix.target }} - # #profile: minimal - # #override: true - #- uses: Swatinem/rust-cache@v2 - - uses: actions/cache@v3 + + - name: Checkout repository + uses: actions/checkout@v4 + - run: 3rdparty/layout.sh + + - uses: actions/cache@v4 with: path: | ~/.cargo/bin/ @@ -65,11 +61,6 @@ jobs: target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Checkout repository - uses: actions/checkout@v3 - - - run: 3rdparty/layout.sh - - name: Run tests # uses: taiki-e/install-action@nextest run: cargo t -F "evg,b2d,ftg,ovg,nvg,ugl" -- --nocapture #cargo nextest r @@ -95,12 +86,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - uses: Swatinem/rust-cache@v2 - - uses: taiki-e/install-action@cargo-llvm-cov - run: rustup toolchain install nightly --profile minimal --component llvm-tools + - uses: Swatinem/rust-cache@v2 # should be after rustup + - uses: taiki-e/install-action@cargo-llvm-cov # https://github.com/taiki-e/cargo-llvm-cov - name: Generate code coverage # https://github.com/actions-rs/tarpaulin #env: # CC: clang @@ -116,9 +107,9 @@ jobs: # run-types: 'Tests,Doctests' - name: Upload to codecov.io - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: - # token: ${{secrets.CODECOV_TOKEN}} # not required for public repos + token: ${{secrets.CODECOV_TOKEN}} # not required for public repos # fail_ci_if_error: true files: lcov.info diff --git a/3rdparty/layout.sh b/3rdparty/layout.sh index dcf2f47..1559769 100755 --- a/3rdparty/layout.sh +++ b/3rdparty/layout.sh @@ -9,21 +9,15 @@ CUR=$(dirname $(readlink -f $0)) && cd $CUR && mkdir -p evg/gpac ftg/stroke echo "Layout 3rdparty libraries..." +B2D_GIT=https://github.com/blend2d/blend2d.git +B2D_GIT=https://github.com/mhfan/blend2d # patch to use single precision floating point instead +[ -e asmjit ] || git clone https://github.com/asmjit/asmjit.git +[ -e blend2d ] || git clone $B2D_GIT + GPAC=~/Devel/gpac -FT2=~/Devel/freetype2 -FT2_GIT=https://git.savannah.gnu.org/git/freetype/freetype2.git -FT2_GIT=https://github.com/mhfan/freetype2 GPAC_GIT=https://github.com/gpac/gpac.git GPAC_GIT=https://github.com/mhfan/gpac # patch to fix for GPAC_FIXED_POINT - [ -d $GPAC ] || { git clone $GPAC_GIT && GPAC=$CUR/gpac; } -[ -d $FT2 ] || { git clone $FT2_GIT && FT2=$CUR/freetype2; } - -[ -e ftg/ftgrays.c ] || { -ln -s $FT2/{include/freetype/ftimage.h,src/smooth/ftgrays.[ch],src/raster/ft{misc.h,raster.c}} ftg/; -ln -s $FT2/src/{raster/ftmisc.h,base/ft{stroke,trigon}.c} ftg/stroke/; -ln -s $FT2/include/freetype/ft{stroke,trigon,image}.h ftg/stroke/; -} [ -e evg/ftgrays.c ] || { ln -s $GPAC/src/evg/{ftgrays.c,rast_soft.h,stencil.c,surface.c,raster_{argb,rgb,565,yuv}.c,raster3d.c} evg/; @@ -32,11 +26,16 @@ ln -s $GPAC/include/gpac/{evg,setup,constants,maths,color,path2d,tools,thread}.h touch evg/gpac/{Remotery,config_file,configuration,main,module,version}.h; } -B2D_GIT=https://github.com/blend2d/blend2d.git -B2D_GIT=https://github.com/mhfan/blend2d # patch to use single precision floating point instead +FT2=~/Devel/freetype2 +FT2_GIT=https://git.savannah.gnu.org/git/freetype/freetype2.git +FT2_GIT=https://github.com/mhfan/freetype2 +[ -d $FT2 ] || { git clone $FT2_GIT && FT2=$CUR/freetype2; } -[ -e blend2d ] || git clone $B2D_GIT -[ -e asmjit ] || git clone https://github.com/asmjit/asmjit.git +[ -e ftg/ftgrays.c ] || { +ln -s $FT2/{include/freetype/ftimage.h,src/smooth/ftgrays.[ch],src/raster/ft{misc.h,raster.c}} ftg/; +ln -s $FT2/src/{raster/ftmisc.h,base/ft{stroke,trigon}.c} ftg/stroke/; +ln -s $FT2/include/freetype/ft{stroke,trigon,image}.h ftg/stroke/; +} [ -e micro-gl ] || git clone https://github.com/micro-gl/micro-gl.git diff --git a/build.rs b/build.rs index bb6a3bd..44bbc8c 100644 --- a/build.rs +++ b/build.rs @@ -15,11 +15,12 @@ fn main() -> Result<(), Box> { println!("cargo:rustc-env=BUILD_GIT_HASH={}", String::from_utf8(output.stdout)?); println!("cargo:rerun-if-changed={}", Path::new(".git").join("index").display()); - //std::process::Command::new(Path::new("3rdparty").join("layout.sh")).status()?; + std::process::Command::new(Path::new("3rdparty").join("layout.sh")).status()?; #[allow(unused)] let path = std::path::PathBuf::from(env::var("OUT_DIR")?); - #[cfg(feature = "ftg")] binding_ftg(&path)?; - #[cfg(feature = "evg")] binding_evg(&path)?; #[cfg(feature = "b2d")] binding_b2d(&path)?; + #[cfg(feature = "evg")] binding_evg(&path)?; + + #[cfg(feature = "ftg")] binding_ftg(&path)?; #[cfg(feature = "ovg")] binding_ovg(&path)?; #[cfg(feature = "ugl")] binding_ugl(&path)?;