Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add github actions config #37

Merged
merged 26 commits into from
Jan 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
```