diff options
| author | Opportunity <[email protected]> | 2020-07-17 11:50:06 +0800 |
|---|---|---|
| committer | Opportunity <[email protected]> | 2020-07-17 11:50:06 +0800 |
| commit | 722d3af61d12dcb05580f6c609c4d13f662e17f1 (patch) | |
| tree | 4c3a9642fa4eebe373f3821f2713f0a8939b44a6 | |
| parent | 50e403c5e3524327f0471cb1ec9cba148db747b1 (diff) | |
fix build
| -rw-r--r-- | .github/workflows/build.yml (renamed from .github/workflows/windows.yml) | 164 | ||||
| -rw-r--r-- | .github/workflows/linux.yml | 54 | ||||
| -rw-r--r-- | .github/workflows/macos.yml | 115 |
3 files changed, 160 insertions, 173 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/build.yml index 9cce0ae20..fbaba5a56 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/build.yml @@ -1,13 +1,169 @@ -name: Windows +name: build on: pull_request: push: release: - types: published + types: [published] jobs: - build: + + + Linux: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: xmake-io/github-action-setup-xmake@v1 + with: + xmake-version: local# + - uses: mihails-strasuns/[email protected] + with: + compiler: dmd-latest + - uses: olegtarasov/get-tag@v2 + id: tagName + + # 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 + # upload artifacts + - uses: actions/upload-artifact@v2 + with: + name: xmake-latest.amd64.deb + path: artifacts/xmake.deb + + # publish release + - name: publish + if: github.event.action == 'published' + uses: actions/[email protected] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: artifacts/xmake.deb + asset_name: xmake-${{ steps.tagName.outputs.tag }}.amd64.deb + asset_content_type: application/zip + + + macOS: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v1 + - uses: xmake-io/github-action-setup-xmake@v1 + with: + xmake-version: local# + - uses: mihails-strasuns/[email protected] + with: + compiler: dmd-latest + - uses: olegtarasov/get-tag@v2 + id: tagName + + # tests + - name: tests + run: | + xmake lua -v -D tests/run.lua + + # build artifacts + - name: artifact + run: | + brew install gnu-tar + gem install --no-document fpm + git submodule update --init + scripts/makepkg osxpkg + scripts/archive-all + scripts/makeself/build-runfile.sh + # upload artifacts + - uses: actions/upload-artifact@v2 + with: + name: xmake-latest.macosx.pkg + path: artifacts/xmake.pkg + - uses: actions/upload-artifact@v2 + with: + name: xmake-latest.gz.run + path: artifacts/xmake.gz.run + - uses: actions/upload-artifact@v2 + with: + name: xmake-latest.xz.run + path: artifacts/xmake.xz.run + - uses: actions/upload-artifact@v2 + with: + name: xmake-latest.tar.gz + path: artifacts/xmake.tar.gz + - uses: actions/upload-artifact@v2 + with: + name: xmake-latest.zip + path: artifacts/xmake.zip + + # publish release + - name: publish + if: github.event.action == 'published' + uses: actions/[email protected] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: artifacts/xmake.pkg + asset_name: xmake-${{ steps.tagName.outputs.tag }}.macosx.pkg + asset_content_type: application/zip + + - name: publish + if: github.event.action == 'published' + uses: actions/[email protected] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: artifacts/xmake.gz.run + asset_name: xmake-${{ steps.tagName.outputs.tag }}.gz.run + asset_content_type: application/zip + + - name: publish + if: github.event.action == 'published' + uses: actions/[email protected] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: artifacts/xmake.xz.run + asset_name: xmake-${{ steps.tagName.outputs.tag }}.xz.run + asset_content_type: application/zip + + - name: publish + if: github.event.action == 'published' + uses: actions/[email protected] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: artifacts/xmake.tar.gz + asset_name: xmake-${{ steps.tagName.outputs.tag }}.tar.gz + asset_content_type: application/zip + + - name: publish + if: github.event.action == 'published' + uses: actions/[email protected] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: artifacts/xmake.zip + asset_name: xmake-${{ steps.tagName.outputs.tag }}.zip + asset_content_type: application/zip + + + Windows: strategy: matrix: arch: [x64, x86] @@ -19,7 +175,7 @@ jobs: - uses: xmake-io/github-action-setup-xmake@v1 with: # this is not supported, use dev branch instead - # xmake-version: ${{ github.repository }}#sha@${{ github.sha }} + # xmake-version: local# xmake-version: branch@dev - uses: mihails-strasuns/[email protected] with: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml deleted file mode 100644 index cc058266b..000000000 --- a/.github/workflows/linux.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Linux - -on: - pull_request: - push: - release: - types: published - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - uses: xmake-io/github-action-setup-xmake@v1 - with: - xmake-version: ${{ github.repository }}#sha@${{ github.sha }} - - uses: mihails-strasuns/[email protected] - with: - compiler: dmd-latest - - uses: olegtarasov/get-tag@v2 - id: tagName - - # 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 - # upload artifacts - - uses: actions/upload-artifact@v2 - with: - name: xmake-latest.amd64.deb - path: artifacts/xmake.deb - - # publish release - - name: publish - if: github.event.action == 'published' - uses: actions/[email protected] - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: artifacts/xmake.deb - asset_name: xmake-${{ steps.tagName.outputs.tag }}.amd64.deb - asset_content_type: application/zip - diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index 736844b0f..000000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,115 +0,0 @@ -name: macOS - -on: - pull_request: - push: - release: - types: published - -jobs: - build: - - runs-on: macos-latest - - steps: - - uses: actions/checkout@v1 - - uses: xmake-io/github-action-setup-xmake@v1 - with: - xmake-version: ${{ github.repository }}#sha@${{ github.sha }} - - uses: mihails-strasuns/[email protected] - with: - compiler: dmd-latest - - uses: olegtarasov/get-tag@v2 - id: tagName - - # tests - - name: tests - run: | - xmake lua -v -D tests/run.lua - - # build artifacts - - name: artifact - run: | - brew install gnu-tar - gem install --no-document fpm - git submodule update --init - scripts/makepkg osxpkg - scripts/archive-all - scripts/makeself/build-runfile.sh - # upload artifacts - - uses: actions/upload-artifact@v2 - with: - name: xmake-latest.macosx.pkg - path: artifacts/xmake.pkg - - uses: actions/upload-artifact@v2 - with: - name: xmake-latest.gz.run - path: artifacts/xmake.gz.run - - uses: actions/upload-artifact@v2 - with: - name: xmake-latest.xz.run - path: artifacts/xmake.xz.run - - uses: actions/upload-artifact@v2 - with: - name: xmake-latest.tar.gz - path: artifacts/xmake.tar.gz - - uses: actions/upload-artifact@v2 - with: - name: xmake-latest.zip - path: artifacts/xmake.zip - - # publish release - - name: publish - if: github.event.action == 'published' - uses: actions/[email protected] - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: artifacts/xmake.pkg - asset_name: xmake-${{ steps.tagName.outputs.tag }}.macosx.pkg - asset_content_type: application/zip - - - name: publish - if: github.event.action == 'published' - uses: actions/[email protected] - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: artifacts/xmake.gz.run - asset_name: xmake-${{ steps.tagName.outputs.tag }}.gz.run - asset_content_type: application/zip - - - name: publish - if: github.event.action == 'published' - uses: actions/[email protected] - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: artifacts/xmake.xz.run - asset_name: xmake-${{ steps.tagName.outputs.tag }}.xz.run - asset_content_type: application/zip - - - name: publish - if: github.event.action == 'published' - uses: actions/[email protected] - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: artifacts/xmake.tar.gz - asset_name: xmake-${{ steps.tagName.outputs.tag }}.tar.gz - asset_content_type: application/zip - - - name: publish - if: github.event.action == 'published' - uses: actions/[email protected] - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: artifacts/xmake.zip - asset_name: xmake-${{ steps.tagName.outputs.tag }}.zip - asset_content_type: application/zip |
