From 0d8d98df820f46e2bcfb187105efbbe464cce056 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 16 Jun 2020 22:46:36 +0800 Subject: improve action ci --- .github/workflows/linux.yml | 41 ++++++++++++++++++++++ .github/workflows/macos.yml | 58 +++++++++++++++++++++++++++++++ .github/workflows/main.yml | 79 ------------------------------------------- .github/workflows/windows.yml | 30 ++++++++++++++++ 4 files changed, 129 insertions(+), 79 deletions(-) create mode 100644 .github/workflows/linux.yml create mode 100644 .github/workflows/macos.yml delete mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/windows.yml 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/setup-dlang@v0.5.0 + 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/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..77eec4c9d --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,58 @@ +name: macOS + +on: + pull_request: + push: + release: + types: published + +jobs: + build: + strategy: + matrix: + os: [macOS-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/setup-dlang@v0.5.0 + with: + compiler: dmd-latest + # 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 latest + scripts/archive-all + scripts/makeself/build-runfile.sh + # upload artifacts + - uses: actions/upload-artifact@v2 + with: + name: xmake-latest.macosx.pkg + path: xmake-latest.pkg + 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 + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index bdd425bad..000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: build - -on: [push, pull_request] - -jobs: - build: - strategy: - matrix: - os: [ubuntu-latest, windows-latest, 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/setup-dlang@v0.5.0 - with: - compiler: dmd-latest - # tests - - name: tests - run: | - 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 - git submodule update --init - 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/setup-dlang@v0.5.0 + with: + compiler: dmd-latest + # tests + - name: tests + run: | + xmake lua -v -D tests/run.lua + -- cgit v1.3.1