Skip to content

Commit

Permalink
inital import
Browse files Browse the repository at this point in the history
  • Loading branch information
Will committed Aug 24, 2023
0 parents commit f9cb516
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: build

on:
push:
branches: "*"

jobs:
build:
strategy:
matrix:
target:
- aarch64-linux-musl
- armv7-linux-musleabihf
- x86_64-linux-musl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- run: |
cp config.mak musl-cross-make
make -C musl-cross-make 2>&1 >> build-$TARGET.log
make -C musl-cross-make install 2>&1 >> build-$TARGET.log
tar -czvf xcc-$TARGET.tar.gz /opt/xcc
env:
TARGET: ${{ matrix.target }}
- uses: actions/upload-artifact@v3
with:
name: xcc-${{ matrix.target }}.tar.gz
path: xcc-${{ matrix.target }}.tar.gz
- uses: actions/upload-artifact@v3
with:
name: build-${{ matrix.target }}.log
path: build-${{ matrix.target }}.log

publish:
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
path: artifacts
- uses: actions/github-script@v6
with:
script: |
const version = context.sha.substring(0, 8);
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${version}`,
sha: context.sha
});
core.setOutput('version', version);
id: create-tag
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.create-tag.outputs.version }}
files: artifacts/**/*.tar.gz
needs: build
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "musl-cross-make"]
path = musl-cross-make
url = https://github.com/richfelker/musl-cross-make
9 changes: 9 additions & 0 deletions config.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MUSL_VER = 1.2.3
GCC_VER = 11.2.0

GCC_CONFIG += --enable-default-pie

DL_CMD = curl --retry 3 -C - -L -s -o
SHA1_CMD = shasum -a 1 -c

OUTPUT = /opt/xcc
1 change: 1 addition & 0 deletions musl-cross-make
Submodule musl-cross-make added at fe9158

0 comments on commit f9cb516

Please sign in to comment.