Skip to content

Commit

Permalink
Windows workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lpenguin committed Jan 18, 2022
1 parent 6e642ea commit 6fd1fb9
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 27 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/vangers_linux_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
31 changes: 21 additions & 10 deletions .github/workflows/vangers_windows_64_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Vangers Windows 64bit Build

on: [push, pull_request]

env:
VANGE_RS_REF: 950a5dd30e374c5e8cd28d7742eec814301c4ed2

jobs:
build:
runs-on: windows-latest
Expand All @@ -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
Expand Down

0 comments on commit 6fd1fb9

Please sign in to comment.