summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-05-26 23:26:35 +0800
committerruki <[email protected]>2021-05-26 23:26:35 +0800
commit6cc0de6667e9862d1f30d2358f1f4243b8ba423f (patch)
tree86d3838cb4ad81e9a27bc4c5beaa02945f70d25d
parent7ba6a1093361f37ebb7d3937041addd284c0311a (diff)
improve ci
-rw-r--r--.github/workflows/archlinux.yml5
-rw-r--r--.github/workflows/fedora.yml7
-rw-r--r--.github/workflows/freebsd.yml2
-rw-r--r--.github/workflows/linux.yml12
-rw-r--r--.github/workflows/macos.yml5
-rw-r--r--.github/workflows/windows.yml22
6 files changed, 18 insertions, 35 deletions
diff --git a/.github/workflows/archlinux.yml b/.github/workflows/archlinux.yml
index 04284b89c..2a9755fb2 100644
--- a/.github/workflows/archlinux.yml
+++ b/.github/workflows/archlinux.yml
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- - name: prepare build tools
+ - name: Prepare build tools
run: |
pacman -Sy --noconfirm --needed git base-devel perl make unzip
- uses: actions/checkout@v2
@@ -26,8 +26,7 @@ jobs:
with:
xmake-version: local#../xmake-source
- # tests
- - name: tests
+ - name: Tests
env:
XMAKE_ROOT: y
run: |
diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml
index e4a932c80..f25b4b7d2 100644
--- a/.github/workflows/fedora.yml
+++ b/.github/workflows/fedora.yml
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- - name: prepare build tools
+ - name: Prepare build tools
run: |
uname -a
dnf -y install @development-tools @rpm-development-tools
@@ -23,15 +23,14 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- - name: prepare local xmake
+ - name: Prepare local xmake
run: |
cp -rf . ../xmake-source
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: local#../xmake-source
- # tests
- - name: tests
+ - name: Tests
env:
XMAKE_ROOT: y
run: |
diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml
index d6b406d41..a23a653e3 100644
--- a/.github/workflows/freebsd.yml
+++ b/.github/workflows/freebsd.yml
@@ -16,7 +16,7 @@ jobs:
with:
submodules: true
- - name: tests
+ - name: Tests
uses: vmactions/[email protected]
with:
usesh: true
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index fa4cca91a..7c1308060 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -26,26 +26,22 @@ jobs:
- uses: little-core-labs/[email protected]
id: tagName
- # tests
- - name: tests
+ - name: Tests
run: |
xmake lua -v -D tests/run.lua
xrepo --version
- # build artifacts
- - name: artifact
+ - name: Artifact
run: |
sudo apt install -y ruby ruby-dev rubygems build-essential
sudo gem install --no-document fpm
scripts/makepkg deb
- # upload artifacts
- uses: actions/upload-artifact@v2
with:
name: xmake-latest.amd64.deb
path: artifacts/xmake.deb
- # publish release
- - name: publish
+ - name: Publish
if: github.event.action == 'published'
uses: actions/[email protected]
env:
@@ -56,7 +52,7 @@ jobs:
asset_name: xmake-${{ steps.tagName.outputs.tag }}.amd64.deb
asset_content_type: application/zip
- - name: publish
+ - name: Publish
if: github.event.action == 'published'
env:
PPA_GPG_PRIKEY_2C0C68C9: ${{ secrets.PPA_GPG_PRIKEY_2C0C68C9 }}
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 064d93a8a..7358074bc 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -23,18 +23,15 @@ jobs:
- uses: little-core-labs/[email protected]
id: tagName
- # installation
- name: Installation
run: |
brew install dmd
- # tests
- name: Tests
run: |
xmake lua -v -D tests/run.lua
xrepo --version
- # build artifacts
- name: Artifact
run: |
brew install gnu-tar
@@ -42,7 +39,6 @@ jobs:
scripts/makepkg osxpkg
scripts/archive-all
scripts/makeself/build-runfile.sh
- # upload artifacts
- uses: actions/upload-artifact@v2
with:
name: xmake-latest.macosx.pkg
@@ -64,7 +60,6 @@ jobs:
name: xmake-latest.zip
path: artifacts/xmake.zip
- # publish release
- name: Publish package
if: github.event.action == 'published'
uses: actions/[email protected]
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 2ae4c1cb8..69daa9178 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -31,12 +31,9 @@ jobs:
- uses: little-core-labs/[email protected]
id: tagName
- # prepare
- - name: prepare
+ - name: Prepare
run: |
- # xmake
xmake show
- # nsis
Invoke-WebRequest "https://github.com/xmake-mirror/nsis/releases/download/v30b3/nsis-3.04.zip" -UseBasicParsing -OutFile ./nsis.zip
Invoke-WebRequest "https://github.com/xmake-mirror/nsis/releases/download/v30b3/nsis-3.04-strlen_8192.zip" -UseBasicParsing -OutFile ./nsis-longstr.zip
Invoke-WebRequest "https://github.com/xmake-mirror/nsis/releases/download/v30b3/UAC.zip" -UseBasicParsing -OutFile ./nsis-uac.zip
@@ -46,14 +43,12 @@ jobs:
Expand-Archive ./nsis-uac.zip -DestinationPath ./nsis -Force
Move-Item ./nsis/UAC.nsh ./nsis/Include/
- # build
- - name: build
+ - name: Build
run: |
xmake f -vD -P core -a ${{ matrix.arch }}
xmake -vD -P core
- # tests
- - name: tests
+ - name: Tests
run: |
Copy-Item ./core/build/xmake.exe ./xmake
Copy-Item ./scripts/xrepo.bat ./xmake
@@ -65,15 +60,14 @@ jobs:
#xmake l -v private.utils.bcsave --rootname='@programdir' -x 'scripts/**|templates/**' xmake
xmake lua -v -D tests/run.lua
- # build artifacts
- - name: set release arch name
+ - name: Set release arch name
run: |
if ("${{ matrix.arch }}" -eq "x64") {
Write-Output "RELEASE_NAME=win64" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf-8 -Append
} else {
Write-Output "RELEASE_NAME=win32" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf-8 -Append
}
- - name: artifact
+ - name: Artifact
run: |
# build installer
(New-Item ./winenv/bin -ItemType Directory).FullName
@@ -141,7 +135,7 @@ jobs:
overwrite: true
# publish release
- - name: publish
+ - name: Publish
if: github.event.action == 'published'
uses: actions/[email protected]
env:
@@ -152,7 +146,7 @@ jobs:
asset_name: xmake-${{ steps.tagName.outputs.tag }}.${{ env.RELEASE_NAME }}.exe
asset_content_type: application/zip
- - name: publish
+ - name: Publish
if: github.event.action == 'published'
uses: actions/[email protected]
env:
@@ -163,7 +157,7 @@ jobs:
asset_name: xmake-${{ steps.tagName.outputs.tag }}.${{ env.RELEASE_NAME }}.zip
asset_content_type: application/zip
- - name: publish
+ - name: Publish
if: github.event.action == 'published'
uses: actions/[email protected]
env: