diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c100c93..00cf384 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,41 +22,47 @@ jobs: strategy: matrix: machine: ["x64", "arm64"] + build_type: [Release, Debug] + fail-fast: false steps: - uses: actions/checkout@v2 - - run: python3 script/check_release.py --version ${{ env.version }} + - run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }} if: ${{ github.event.inputs.skip_release != 'true' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: python3 script/checkout.py --version ${{ env.version }} - - run: python3 script/build.py --machine ${{ matrix.machine }} - - run: python3 script/archive.py --version ${{ env.version }} --machine ${{ matrix.machine }} + - run: python3 script/build.py --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }} + - run: python3 script/archive.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }} - uses: actions/upload-artifact@v2 with: - name: Skia-${{ env.version }}-macos-Release-${{ matrix.machine }}.zip + name: Skia-${{ env.version }}-macos-${{ matrix.build_type }}-${{ matrix.machine }}.zip path: '*.zip' - - run: python3 script/release.py --version ${{ env.version }} --machine ${{ matrix.machine }} + - run: python3 script/release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }} if: ${{ github.event.inputs.skip_release != 'true' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} linux: runs-on: ubuntu-16.04 + strategy: + matrix: + build_type: [Release, Debug] + fail-fast: false steps: - uses: actions/checkout@v2 - run: sudo ./script/prepare_linux.sh - - run: python3 script/check_release.py --version ${{ env.version }} + - run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} if: ${{ github.event.inputs.skip_release != 'true' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/checkout.py --version ${{ env.version }} - - run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/build.py - - run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/archive.py --version ${{ env.version }} + - run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/build.py --build-type ${{ matrix.build_type }} + - run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/archive.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} - uses: actions/upload-artifact@v2 with: - name: Skia-${{ env.version }}-linux-Release-x64.zip + name: Skia-${{ env.version }}-linux-${{ matrix.build_type }}-x64.zip path: '*.zip' - - run: python3 script/release.py --version ${{ env.version }} + - run: python3 script/release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} if: ${{ github.event.inputs.skip_release != 'true' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -113,10 +119,14 @@ jobs: windows: runs-on: windows-2019 + strategy: + matrix: + build_type: [Release, Debug] + fail-fast: false steps: - uses: actions/checkout@v2 - shell: bash - run: python3 script/check_release.py --version ${{ env.version }} + run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} if: ${{ github.event.inputs.skip_release != 'true' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -125,15 +135,15 @@ jobs: - shell: bash run: python3 script/checkout.py --version ${{ env.version }} - shell: bash - run: python3 script/build.py + run: python3 script/build.py --build-type ${{ matrix.build_type }} - shell: bash - run: python3 script/archive.py --version ${{ env.version }} + run: python3 script/archive.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} - uses: actions/upload-artifact@v2 with: - name: Skia-${{ env.version }}-windows-Release-x64.zip + name: Skia-${{ env.version }}-windows-${{ matrix.build_type }}-x64.zip path: '*.zip' - shell: bash - run: python3 script/release.py --version ${{ env.version }} + run: python3 script/release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} if: ${{ github.event.inputs.skip_release != 'true' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index b4aa300..8c1b502 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,6 @@ To build a debug build: ```sh python3 script/checkout.py --version m91-b99622c05a -python3 script/build.py --debug -python3 script/archive.py --debug +python3 script/build.py --build-type Debug +python3 script/archive.py --build-type Debug ``` \ No newline at end of file diff --git a/script/common.py b/script/common.py index ff7027e..763b11c 100644 --- a/script/common.py +++ b/script/common.py @@ -4,7 +4,7 @@ def create_parser(version_required=False): parser = argparse.ArgumentParser() - parser.add_argument('--debug', action='store_true') + parser.add_argument('--build-type', default='Release') parser.add_argument('--version', required=version_required) parser.add_argument('--classifier') parser.add_argument('--system') @@ -38,7 +38,7 @@ def version(): def build_type(): parser = create_parser() (args, _) = parser.parse_known_args() - return 'Debug' if args.debug else 'Release' + return args.build_type def classifier(): parser = create_parser()