Skip to content

Commit

Permalink
updated windows ci
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-xu committed Jun 10, 2024
1 parent 10c200d commit bd0d41a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/windows-precompile-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ jobs:
export PKG_NAME=evision-nif_${{ matrix.pair.NIF_VERSION }}-x86_64-windows-msvc-contrib-cuda${{ matrix.pair.cuda_id }}-${GITHUB_REF##*/v}
mkdir -p "${PKG_NAME}"
export PRIV_DIR="$(pwd)/_build/${MIX_ENV}/lib/evision/priv"
mv "${PRIV_DIR}/include" C:/evision/include
export TMP_INCLUDE_DIR="$(pwd)/include"
mv "${PRIV_DIR}/include" "${TMP_INCLUDE_DIR}"
cp -a "${PRIV_DIR}" "${PKG_NAME}"
cp -a lib/generated "${PKG_NAME}/elixir_generated"
cp -a src/generated "${PKG_NAME}/erlang_generated"
Expand All @@ -102,7 +103,7 @@ jobs:
mv "${PKG_NAME}.tar.gz" "${RUNNER_DIR}/artifacts"
cd "${RUNNER_DIR}/artifacts"
sha256sum "${PKG_NAME}.tar.gz" | tee "${PKG_NAME}.tar.gz.sha256"
mv C:/evision/include "${PRIV_DIR}/include"
mv "${TMP_INCLUDE_DIR}" "${PRIV_DIR}/include"
- name: Mix compile for Gleam (experimental)
shell: bash
Expand All @@ -120,7 +121,8 @@ jobs:
export PKG_NAME=gleam_evision-nif_${{ matrix.pair.NIF_VERSION }}-x86_64-windows-msvc-contrib-cuda${{ matrix.pair.cuda_id }}-${GITHUB_REF##*/v}
mkdir -p "${PKG_NAME}"
export PRIV_DIR="$(pwd)/_build/${MIX_ENV}/lib/evision/priv"
mv "${PRIV_DIR}/include" C:/evision/include
export TMP_INCLUDE_DIR="$(pwd)/include"
mv "${PRIV_DIR}/include" "${TMP_INCLUDE_DIR}"
cp -a "${PRIV_DIR}" "${PKG_NAME}"
cp -a gleam_src "${PKG_NAME}/gleam_generated"
tar -czf "${PKG_NAME}.tar.gz" "${PKG_NAME}"
Expand All @@ -130,7 +132,7 @@ jobs:
mv "${PKG_NAME}.tar.gz" "${RUNNER_DIR}/artifacts"
cd "${RUNNER_DIR}/artifacts"
sha256sum "${PKG_NAME}.tar.gz" | tee "${PKG_NAME}.tar.gz.sha256"
mv C:/evision/include "${PRIV_DIR}/include"
mv "${TMP_INCLUDE_DIR}" "${PRIV_DIR}/include"
- uses: softprops/action-gh-release@v2
with:
Expand Down Expand Up @@ -218,7 +220,8 @@ jobs:
export PKG_NAME=evision-nif_${{ matrix.pair.NIF_VERSION }}-x86_64-windows-msvc-contrib-cuda${{ matrix.pair.cuda_id }}-${GITHUB_REF##*/v}
mkdir -p "${PKG_NAME}"
export PRIV_DIR="$(pwd)/_build/${MIX_ENV}/lib/evision/priv"
mv "${PRIV_DIR}/include" C:/evision/include
export TMP_INCLUDE_DIR="$(pwd)/include"
mv "${PRIV_DIR}/include" "${TMP_INCLUDE_DIR}"
cp -a "${PRIV_DIR}" "${PKG_NAME}"
cp -a lib/generated "${PKG_NAME}/elixir_generated"
cp -a src/generated "${PKG_NAME}/erlang_generated"
Expand All @@ -229,7 +232,7 @@ jobs:
mv "${PKG_NAME}.tar.gz" "${RUNNER_DIR}/artifacts"
cd "${RUNNER_DIR}/artifacts"
sha256sum "${PKG_NAME}.tar.gz" | tee "${PKG_NAME}.tar.gz.sha256"
mv C:/evision/include "${PRIV_DIR}/include"
mv "${TMP_INCLUDE_DIR}" "${PRIV_DIR}/include"
- name: Mix compile for Gleam (experimental)
shell: bash
Expand All @@ -247,7 +250,8 @@ jobs:
export PKG_NAME=gleam_evision-nif_${{ matrix.pair.NIF_VERSION }}-x86_64-windows-msvc-contrib-cuda${{ matrix.pair.cuda_id }}-${GITHUB_REF##*/v}
mkdir -p "${PKG_NAME}"
export PRIV_DIR="$(pwd)/_build/${MIX_ENV}/lib/evision/priv"
mv "${PRIV_DIR}/include" C:/evision/include
export TMP_INCLUDE_DIR="$(pwd)/include"
mv "${PRIV_DIR}/include" "${TMP_INCLUDE_DIR}"
cp -a "${PRIV_DIR}" "${PKG_NAME}"
cp -a gleam_src "${PKG_NAME}/gleam_generated"
tar -czf "${PKG_NAME}.tar.gz" "${PKG_NAME}"
Expand All @@ -257,7 +261,7 @@ jobs:
mv "${PKG_NAME}.tar.gz" "${RUNNER_DIR}/artifacts"
cd "${RUNNER_DIR}/artifacts"
sha256sum "${PKG_NAME}.tar.gz" | tee "${PKG_NAME}.tar.gz.sha256"
mv C:/evision/include "${PRIV_DIR}/include"
mv "${TMP_INCLUDE_DIR}" "${PRIV_DIR}/include"
- uses: softprops/action-gh-release@v2
with:
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/windows-precompile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ jobs:
export PKG_NAME=evision-nif_${{ matrix.pair.NIF_VERSION }}-${{ matrix.pair.arch_name }}-windows-msvc-${GITHUB_REF##*/v}
mkdir -p "${PKG_NAME}"
export PRIV_DIR="$(pwd)/_build/${MIX_ENV}/lib/evision/priv"
mv "${PRIV_DIR}/include" C:/evision/include
export TMP_INCLUDE_DIR="$(pwd)/include"
mv "${PRIV_DIR}/include" "${TMP_INCLUDE_DIR}"
cp -a "${PRIV_DIR}" "${PKG_NAME}"
cp -a lib/generated "${PKG_NAME}/elixir_generated"
cp -a src/generated "${PKG_NAME}/erlang_generated"
Expand All @@ -113,7 +114,7 @@ jobs:
mv "${PKG_NAME}.tar.gz" artifacts
cd artifacts
sha256sum "${PKG_NAME}.tar.gz" | tee "${PKG_NAME}.tar.gz.sha256"
mv C:/evision/include "${PRIV_DIR}/include"
mv "${TMP_INCLUDE_DIR}" "${PRIV_DIR}/include"
- name: Mix compile (without contrib modules) for Gleam (experimental)
shell: bash
Expand All @@ -136,7 +137,8 @@ jobs:
export PKG_NAME=evision-nif_${{ matrix.pair.NIF_VERSION }}-${{ matrix.pair.arch_name }}-windows-msvc-${GITHUB_REF##*/v}
mkdir -p "${PKG_NAME}"
export PRIV_DIR="$(pwd)/_build/${MIX_ENV}/lib/evision/priv"
mv "${PRIV_DIR}/include" C:/evision/include
export TMP_INCLUDE_DIR="$(pwd)/include"
mv "${PRIV_DIR}/include" "${TMP_INCLUDE_DIR}"
cp -a "${PRIV_DIR}" "${PKG_NAME}"
cp -a gleam_src "${PKG_NAME}/gleam_generated"
tar -czf "${PKG_NAME}.tar.gz" "${PKG_NAME}"
Expand All @@ -146,7 +148,7 @@ jobs:
mv "${PKG_NAME}.tar.gz" artifacts
cd artifacts
sha256sum "${PKG_NAME}.tar.gz" | tee "${PKG_NAME}.tar.gz.sha256"
mv C:/evision/include "${PRIV_DIR}/include"
mv "${TMP_INCLUDE_DIR}" "${PRIV_DIR}/include"
- name: Mix compile (with contrib modules)
shell: bash
Expand All @@ -168,7 +170,8 @@ jobs:
export PKG_NAME=evision-nif_${{ matrix.pair.NIF_VERSION }}-${{ matrix.pair.arch_name }}-windows-msvc-contrib-${GITHUB_REF##*/v}
mkdir -p "${PKG_NAME}"
export PRIV_DIR="$(pwd)/_build/${MIX_ENV}/lib/evision/priv"
mv "${PRIV_DIR}/include" C:/evision/include
export TMP_INCLUDE_DIR="$(pwd)/include"
mv "${PRIV_DIR}/include" "${TMP_INCLUDE_DIR}"
cp -a "${PRIV_DIR}" "${PKG_NAME}"
cp -a lib/generated "${PKG_NAME}/elixir_generated"
cp -a src/generated "${PKG_NAME}/erlang_generated"
Expand All @@ -179,7 +182,7 @@ jobs:
mv "${PKG_NAME}.tar.gz" artifacts
cd artifacts
sha256sum "${PKG_NAME}.tar.gz" | tee "${PKG_NAME}.tar.gz.sha256"
mv C:/evision/include "${PRIV_DIR}/include"
mv "${TMP_INCLUDE_DIR}" "${PRIV_DIR}/include"
- name: Mix compile (with contrib modules) for Gleam (experimental)
shell: bash
Expand All @@ -202,7 +205,8 @@ jobs:
export PKG_NAME=gleam_evision-nif_${{ matrix.pair.NIF_VERSION }}-${{ matrix.pair.arch_name }}-windows-msvc-contrib-${GITHUB_REF##*/v}
mkdir -p "${PKG_NAME}"
export PRIV_DIR="$(pwd)/_build/${MIX_ENV}/lib/evision/priv"
mv "${PRIV_DIR}/include" C:/evision/include
export TMP_INCLUDE_DIR="$(pwd)/include"
mv "${PRIV_DIR}/include" "${TMP_INCLUDE_DIR}"
cp -a "${PRIV_DIR}" "${PKG_NAME}"
cp -a gleam_src "${PKG_NAME}/gleam_generated"
tar -czf "${PKG_NAME}.tar.gz" "${PKG_NAME}"
Expand All @@ -212,7 +216,7 @@ jobs:
mv "${PKG_NAME}.tar.gz" artifacts
cd artifacts
sha256sum "${PKG_NAME}.tar.gz" | tee "${PKG_NAME}.tar.gz.sha256"
mv C:/evision/include "${PRIV_DIR}/include"
mv "${TMP_INCLUDE_DIR}" "${PRIV_DIR}/include"
- uses: softprops/action-gh-release@v2
with:
Expand Down

0 comments on commit bd0d41a

Please sign in to comment.