Skip to content

Commit

Permalink
add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
XenoAmess authored and Storyyeller committed Jan 28, 2025
1 parent 401753d commit 5131367
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# .github/workflows/release.yml

on: push

jobs:
release:
name: release ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
archive: zip
- target: x86_64-unknown-linux-musl
archive: tar.gz
steps:
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}
msys2-build-test:
strategy:
fail-fast: false
matrix:
sys: [MINGW64, UCRT64,CLANG64]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: base-devel git
pacboy: >-
rust:p
- name: Run cargo
shell: msys2 {0}
run: cargo build --release
- name: Run tests
shell: msys2 {0}
run: cargo test --release
- name: Rename Compile Output
shell: msys2 {0}
run: mv target/release/krak2.exe target/release/${{ matrix.sys }}_krak2.exe
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# .github/workflows/release.yml

on:
release:
types: [created]

jobs:
release:
name: release ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
archive: zip
- target: x86_64-unknown-linux-musl
archive: tar.gz
steps:
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}
msys2-build-test:
strategy:
fail-fast: false
matrix:
sys: [MINGW64, UCRT64,CLANG64]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: base-devel git
pacboy: >-
rust:p
- name: Run cargo
shell: msys2 {0}
run: cargo build --release
- name: Run tests
shell: msys2 {0}
run: cargo test --release
- name: Rename Compile Output
shell: msys2 {0}
run: mv target/release/krak2.exe target/release/${{ matrix.sys }}_krak2.exe
- name: Release with Notes
uses: softprops/action-gh-release@v1
with:
files: |
target/release/${{ matrix.sys }}_krak2.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,39 @@ out.*
temp
temp.*
Cargo.lock

target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### IntelliJ IDEA ###
.idea/
*.iws
*.iml
*.ipr

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store

0 comments on commit 5131367

Please sign in to comment.