diff --git a/.github/workflows/vangers_linux_build.yml b/.github/workflows/vangers_linux_build.yml index 94609f98..970f0a12 100644 --- a/.github/workflows/vangers_linux_build.yml +++ b/.github/workflows/vangers_linux_build.yml @@ -2,37 +2,38 @@ name: Vangers Linux Build on: [push, pull_request] +env: + VANGE_RS_REF: 950a5dd30e374c5e8cd28d7742eec814301c4ed2 + jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: vange-rs -- cache build + uses: actions/cache@v2 + id: vange-rs-cache-build + with: + path: vange-rs/target/release/libvangers_ffi.a + key: ${{ env.VANGE_RS_REF }} + - name: install rustup toolchain + if: steps.vange-rs-cache-build.outputs.cache-hit != 'true' uses: actions-rs/toolchain@v1 with: toolchain: stable - name: vange-rs -- download - # uses: actions/checkout@v2 - # with: - # repository: kvark/vange-rs - # ref: 439d89a - # token: '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' - # path: vange-rs - # # fetch-depth: 1 - run: git clone --depth 1 https://github.com/kvark/vange-rs vange-rs - - - # - name: vange-rs -- cache build - # uses: actions/cache@v2 - # id: vange-rs-cache-build - # with: - # path: vange-rs/target/release/release/libvangers_ffi.a - # key: 439d89a # TODO + if: steps.vange-rs-cache-build.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: kvark/vange-rs + ref: ${{ env.VANGE_RS_REF }} + path: vange-rs - name: vange-rs -- build - # if: steps.vange-rs-cache-build.outputs.cache-hit != 'true' + if: steps.vange-rs-cache-build.outputs.cache-hit != 'true' run: cargo build --release working-directory: vange-rs/lib/ffi diff --git a/.github/workflows/vangers_windows_64_build.yml b/.github/workflows/vangers_windows_64_build.yml index 6bb6eff1..e9dcc0ca 100644 --- a/.github/workflows/vangers_windows_64_build.yml +++ b/.github/workflows/vangers_windows_64_build.yml @@ -2,6 +2,9 @@ name: Vangers Windows 64bit Build on: [push, pull_request] +env: + VANGE_RS_REF: 950a5dd30e374c5e8cd28d7742eec814301c4ed2 + jobs: build: runs-on: windows-latest @@ -24,27 +27,35 @@ jobs: mingw-w64-x86_64-dlfcn' - uses: actions/checkout@v1 + - name: vange-rs -- cache build + uses: actions/cache@v2 + id: vange-rs-cache-build + with: + path: vange-rs/target/release/libvangers_ffi.a + key: ${{ env.VANGE_RS_REF }} + - name: vange-rs -- install rustup + if: steps.vange-rs-cache-build.outputs.cache-hit != 'true' uses: actions-rs/toolchain@v1 with: toolchain: stable target: x86_64-pc-windows-gnu default: true + - name: vange-rs -- configure rustup - run: rustup default stable-x86_64-pc-windows-gnu + if: steps.vange-rs-cache-build.outputs.cache-hit != 'true' + run: rustup default stable-x86_64-pc-windows-gnu - # TODO: revision - name: vange-rs -- download - run: git clone --depth 1 https://github.com/kvark/vange-rs vange-rs - # uses: actions/checkout@v2 - # with: - # repository: kvark/vange-rs - # ref: 439d89a - # path: vange-rs - # # fetch-depth: 1 + uses: actions/checkout@v2 + with: + repository: kvark/vange-rs + ref: ${{ env.VANGE_RS_REF }} + path: vange-rs - name: vange-rs -- build - run: cargo build --release + if: steps.vange-rs-cache-build.outputs.cache-hit != 'true' + run: cargo build --release working-directory: vange-rs/lib/ffi - name: vange-rs -- copy artifacts to prefix