Skip to content

Commit

Permalink
add cctools prebuilt workflow (#3)
Browse files Browse the repository at this point in the history
Co-authored-by: Marc-André Moreau <[email protected]>
  • Loading branch information
awakecoding and Marc-André Moreau authored Aug 18, 2021
1 parent c2bec33 commit 68e31cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/cctools-prebuilt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,18 @@ name: cctools prebuilt
on: workflow_dispatch
jobs:
build:
name: cctools ${{matrix.version}} [${{matrix.arch}}-${{matrix.os}}]
name: cctools [${{matrix.arch}}-${{matrix.os}}]
runs-on: ${{matrix.runner}}
strategy:
fail-fast: false
matrix:
arch: [ x86_64 ]
os: [ macos, linux ]
os: [ linux ]

include:
- os: macos
runner: macos-10.15
- os: linux
runner: ubuntu-18.04
steps:
- name: Configure macOS runner
if: runner.os == 'macOS'
env:
CMAKE_OSX_DEPLOYMENT_TARGET: "10.12"
run: |
brew install git ninja
- name: Configure Linux runner
if: runner.os == 'Linux'
run: |
Expand Down Expand Up @@ -53,18 +44,18 @@ jobs:
run: |
git clone https://github.com/tpoechtrager/cctools-port.git
cd cctools-port/cctools
./configure --prefix=/tmp/cctools --with-libtapi=/tmp/cctools --with-libxar=/tmp/cctools --target=x86_64-apple-darwin11 --program-prefix=apple-
./configure --prefix=/tmp/cctools --with-libtapi=/tmp/cctools --with-libxar=/tmp/cctools
make
make install
cd ../..
- name: Package cctools
run: |
mv /tmp/cctools ./cctools-${{matrix.version}}-${{matrix.arch}}-${{matrix.os}}
tar -cJf ctools-${{matrix.version}}-${{matrix.arch}}-${{matrix.os}}.tar.xz ctools-${{matrix.version}}-${{matrix.arch}}-${{matrix.os}}
mv /tmp/cctools ./cctools-${{matrix.arch}}-${{matrix.os}}
tar -cJf cctools-${{matrix.arch}}-${{matrix.os}}.tar.xz cctools-${{matrix.arch}}-${{matrix.os}}
- name: Upload cctools package
uses: actions/upload-artifact@v2
with:
name: cctools-${{matrix.version}}-${{matrix.arch}}-${{matrix.os}}
path: cctools-${{matrix.version}}-${{matrix.arch}}-${{matrix.os}}.tar.xz
name: cctools-${{matrix.arch}}-${{matrix.os}}
path: cctools-${{matrix.arch}}-${{matrix.os}}.tar.xz
8 changes: 4 additions & 4 deletions .github/workflows/llvm-prebuilt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,17 @@ jobs:
- name: Package LLVM
if: runner.os != 'Windows'
run: |
mv llvm-install clang+llvm
tar -cJf clang+llvm.tar.xz clang+llvm
mv llvm-install clang+llvm-${{matrix.version}}-${{matrix.arch}}-${{matrix.os}}
tar -cJf clang+llvm-${{matrix.version}}-${{matrix.arch}}-${{matrix.os}}.tar.xz clang+llvm-${{matrix.version}}-${{matrix.arch}}-${{matrix.os}}
- name: Package LLVM
if: runner.os == 'Windows'
run: |
ren llvm-install clang+llvm
cmd.exe /c "7z a -ttar -snl -so clang+llvm.tar clang+llvm/* | 7z a -si clang+llvm.tar.xz"
cmd.exe /c "7z a -ttar -snl -so clang+llvm-${{matrix.version}}-${{matrix.arch}}-${{matrix.os}}.tar clang+llvm-${{matrix.version}}-${{matrix.arch}}-${{matrix.os}} | 7z a -si clang+llvm-${{matrix.version}}-${{matrix.arch}}-${{matrix.os}}.tar.xz"
- name: Upload LLVM package
uses: actions/upload-artifact@v2
with:
name: clang+llvm-${{matrix.version}}-${{matrix.arch}}-${{matrix.os}}
path: clang+llvm.tar.xz
path: clang+llvm-${{matrix.version}}-${{matrix.arch}}-${{matrix.os}}.tar.xz

0 comments on commit 68e31cf

Please sign in to comment.