summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorruki <[email protected]>2020-06-16 22:46:36 +0800
committerruki <[email protected]>2020-06-16 10:39:36 +0800
commit0d8d98df820f46e2bcfb187105efbbe464cce056 (patch)
tree262639957f81f5f45f635ef1558160a65c81d352 /.github/workflows
parent6dbfda48d9aa8f84f39b0a16ddd18aa4860c3b50 (diff)
improve action ci
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/linux.yml41
-rw-r--r--.github/workflows/macos.yml (renamed from .github/workflows/main.yml)35
-rw-r--r--.github/workflows/windows.yml30
3 files changed, 78 insertions, 28 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
new file mode 100644
index 000000000..af604a6cb
--- /dev/null
+++ b/.github/workflows/linux.yml
@@ -0,0 +1,41 @@
+name: Linux
+
+on:
+ pull_request:
+ push:
+ release:
+ types: published
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ os: [ubuntu-latest]
+
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - uses: actions/checkout@v1
+ - uses: xmake-io/github-action-setup-xmake@v1
+ with:
+ xmake-version: sha@${{ github.sha }}
+ - uses: mihails-strasuns/[email protected]
+ with:
+ compiler: dmd-latest
+ # tests
+ - name: tests
+ run: |
+ xmake lua -v -D tests/run.lua
+ # build artifacts
+ - name: artifact
+ run: |
+ sudo apt-get install -y ruby ruby-dev rubygems build-essential
+ sudo gem install --no-document fpm
+ git submodule update --init
+ scripts/makepkg deb latest
+ # upload artifacts
+ - uses: actions/upload-artifact@v2
+ with:
+ name: xmake-latest.amd64.deb
+ path: xmake_latest_amd64.deb
+
diff --git a/.github/workflows/main.yml b/.github/workflows/macos.yml
index bdd425bad..77eec4c9d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/macos.yml
@@ -1,26 +1,24 @@
-name: build
+name: macOS
-on: [push, pull_request]
+on:
+ pull_request:
+ push:
+ release:
+ types: published
jobs:
build:
strategy:
matrix:
- os: [ubuntu-latest, windows-latest, macOS-latest]
+ os: [macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: xmake-io/github-action-setup-xmake@v1
- if: matrix.os != 'windows-latest' || github.event_name == 'push'
with:
xmake-version: sha@${{ github.sha }}
- - uses: xmake-io/github-action-setup-xmake@v1
- # this is not supported, use dev branch instead
- if: matrix.os == 'windows-latest' && github.event_name == 'pull_request'
- with:
- xmake-version: branch@dev
- uses: mihails-strasuns/[email protected]
with:
compiler: dmd-latest
@@ -30,7 +28,6 @@ jobs:
xmake lua -v -D tests/run.lua
# build artifacts
- name: artifact
- if: matrix.os == 'macOS-latest'
run: |
brew install gnu-tar
gem install --no-document fpm
@@ -38,41 +35,23 @@ jobs:
scripts/makepkg osxpkg latest
scripts/archive-all
scripts/makeself/build-runfile.sh
- - name: artifact
- if: matrix.os == 'ubuntu-latest'
- run: |
- sudo apt-get install -y ruby ruby-dev rubygems build-essential
- sudo gem install --no-document fpm
- git submodule update --init
- scripts/makepkg deb latest
# upload artifacts
- uses: actions/upload-artifact@v2
- if: matrix.os == 'macOS-latest'
with:
name: xmake-latest.macosx.pkg
path: xmake-latest.pkg
- - uses: actions/upload-artifact@v2
- if: matrix.os == 'ubuntu-latest'
- with:
- name: xmake-latest.amd64.deb
- path: xmake_latest_amd64.deb
- - uses: actions/upload-artifact@v2
- if: matrix.os == 'macOS-latest'
with:
name: xmake-latest.gz.run
path: artifacts/xmake.gz.run
- uses: actions/upload-artifact@v2
- if: matrix.os == 'macOS-latest'
with:
name: xmake-latest.xz.run
path: artifacts/xmake.xz.run
- uses: actions/upload-artifact@v2
- if: matrix.os == 'macOS-latest'
with:
name: xmake-latest.tar.gz
path: artifacts/xmake.tar.gz
- uses: actions/upload-artifact@v2
- if: matrix.os == 'macOS-latest'
with:
name: xmake-latest.zip
path: artifacts/xmake.zip
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
new file mode 100644
index 000000000..c796f25d7
--- /dev/null
+++ b/.github/workflows/windows.yml
@@ -0,0 +1,30 @@
+name: Windows
+
+on:
+ pull_request:
+ push:
+ release:
+ types: published
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ os: [windows-latest]
+
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - uses: actions/checkout@v1
+ - uses: xmake-io/github-action-setup-xmake@v1
+ # this is not supported, use dev branch instead
+ with:
+ xmake-version: branch@dev
+ - uses: mihails-strasuns/[email protected]
+ with:
+ compiler: dmd-latest
+ # tests
+ - name: tests
+ run: |
+ xmake lua -v -D tests/run.lua
+