Skip to content

Commit

Permalink
add github actions config (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
Terkwood committed Jan 2, 2021
1 parent a8b59ec commit eb46efd
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/install-build-tools.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Check to see if we are currently running "as Administrator"
# See: https://github.com/mvijfschaft/dotfiles/blob/master/install.ps1


# https://github.com/lukesampson/scoop
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

scoop update

scoop install llvm --global

51 changes: 51 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build dylib
on: [push]
jobs:
build-win:
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: install llvm
run: .\.github\workflows\install-build-tools.ps1
shell: powershell
- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: build with clang in env
env:
LIBCLANG_PATH: "C:\\ProgramData\\scoop\\apps\\llvm\\current\\bin"
run: cargo build --release --all-features
- name: release
uses: softprops/action-gh-release@v1
# only do this step when there's a git tag
if: startsWith(github.ref, 'refs/tags/')
with:
files: target/release/deltapack.dll
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-mac:
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-apple-darwin
default: true
override: true
- name: build
run: cargo build --release --all-features
- name: release
uses: softprops/action-gh-release@v1
# only do this step when there's a git tag
if: startsWith(github.ref, 'refs/tags/')
with:
files: target/release/libdeltapack.dylib
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,16 @@ The exported payload will now contain a library file specific to your client's g
libincremental_patch.so linux-test.pck linux-test.x86_64
```

## Making a new release

This project is configured to publish Mac and Windows versions
of the rust lib using github actions.

You need to tag a release in order to trigger the publishing
step. You can then download the shared lib from the releases
page in github.

```sh
git tag -a v0.1.0 -m "my release"
git push --tags
```

0 comments on commit eb46efd

Please sign in to comment.