mirror of
https://github.com/RubyMetric/chsrc.git
synced 2024-11-22 12:58:02 +08:00
Add windows workflow
This commit is contained in:
parent
5f729f7989
commit
01fef6b6bf
29
.github/workflows/c-cpp.yml
vendored
29
.github/workflows/c-cpp.yml
vendored
|
@ -1,29 +0,0 @@
|
|||
name: C/C++ CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "gh-pipeline" ]
|
||||
pull_request:
|
||||
branches: [ "gh-pipeline" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: [ubuntu-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: make
|
||||
run: make
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v3.1.3
|
||||
with:
|
||||
# Artifact name
|
||||
name: chsrc
|
||||
path: chsrc
|
||||
# The desired behavior if no files are found using the provided path.
|
||||
|
||||
warn: Output a warning but do not fail the action
|
||||
error: Fail the action with an error message
|
||||
|
53
.github/workflows/windows.yml
vendored
Normal file
53
.github/workflows/windows.yml
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
name: Windows Build
|
||||
on:
|
||||
push:
|
||||
branches: [ "gh-pipeline" ]
|
||||
pull_request:
|
||||
branches: [ "gh-pipeline" ]
|
||||
|
||||
jobs:
|
||||
build-and-upload:
|
||||
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install x64 gcc
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: UCRT64
|
||||
update: true
|
||||
install: |
|
||||
mingw-w64-ucrt-x86_64-gcc
|
||||
mingw-w64-ucrt-x86_64-make
|
||||
mingw-w64-i686-gcc
|
||||
mingw-w64-i686-make
|
||||
|
||||
- name: Compile chsrc x64
|
||||
run: |
|
||||
mingw32-make.exe CI BUILD_NAME=chsrc-x64-windows
|
||||
|
||||
- name: Compile chsrc x86
|
||||
env:
|
||||
MSYSTEM: MINGW32
|
||||
run: |
|
||||
mingw32-make.exe CI BUILD_NAME=chsrc-x86-windows
|
||||
|
||||
- name: List files
|
||||
run: ls *.exe
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
tag_name: preview
|
||||
files: |
|
||||
chsrc-x64-windows.exe
|
||||
chsrc-x86-windows.exe
|
||||
token: ${{ secrets.CHSRC_UPLOAD }}
|
Loading…
Reference in New Issue
Block a user