-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
113 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Container image that runs your code | ||
|
||
FROM dionoid/dasm-build:v1 | ||
|
||
# FROM ubuntu:16.04 | ||
|
||
# Install packages | ||
# RUN apt update && apt upgrade -y &&\ | ||
# apt install -y curl &&\ | ||
# apt install -y make &&\ | ||
# apt install -y unzip &&\ | ||
# apt install -y git &&\ | ||
# apt install -y gcc &&\ | ||
# apt install -y gcc-multilib &&\ | ||
# apt install -y mingw-w64 | ||
|
||
#download darwin build packages | ||
# RUN curl -O http://security.ubuntu.com/ubuntu/pool/universe/o/openssl098/libssl0.9.8_0.9.8o-7ubuntu3.2.14.04.1_amd64.deb &&\ | ||
# curl -O http://www.tarnyko.net/repo/apple-x86-gcc-DEBIAN-AMD64.zip &&\ | ||
# unzip apple-x86-gcc-DEBIAN-AMD64.zip &&\ | ||
# export DEBIAN_FRONTEND=noninteractive &&\ | ||
# dpkg -i libssl0.9.8_0.9.8o-7ubuntu3.2.14.04.1_amd64.deb &&\ | ||
# dpkg -i apple-uni-sdk-10.5_20110407-0.flosoft1_amd64.deb &&\ | ||
# dpkg -i apple-x86-odcctools_758.159-0flosoft11_amd64.deb &&\ | ||
# dpkg -i apple-x86-gcc_4.2.1~5646.1flosoft2_amd64.deb &&\ | ||
# rm *.zip &&\ | ||
# rm *.deb | ||
|
||
# Copies your code file from your action repository to the filesystem path `/` of the container | ||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
# Code file to execute when the docker container starts up (`entrypoint.sh`) | ||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# dasm-snapshot-builder | ||
This is a GitHub action to build DASM snapshots and automatically commit the packaged snapshots into the source branch | ||
# DASM docker build action | ||
|
||
This action builds DASM from a git branch, and commits the packaged snapshot releases back into the same branch. | ||
|
||
## Only for internal usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# action.yml | ||
name: 'DASM Snapshot Builder' | ||
description: 'Builds DASM snapshots' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.branch }} | ||
- ${{ inputs.username }} | ||
- ${{ inputs.password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/sh -l | ||
|
||
# timestamp to use in name of snapshot builds | ||
timestamp=$(date '+%Y%m%d%H%M%S') | ||
|
||
# setup git user | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "automated build" | ||
|
||
# clone dasm branch | ||
git clone --single-branch --branch $1 https://$2:$3@github.com/dasm-assembler/dasm.git | ||
|
||
# build dasm binaries for all platforms | ||
cd dasm/docker | ||
./make_dasm_all_platforms.sh | ||
|
||
# create empty snapshot-builds folder | ||
cd .. | ||
rm -r snapshot-builds | ||
mkdir snapshot-builds | ||
|
||
# create package folders for all platforms and tar gz 'm up | ||
mkdir -p bin/dasm-$timestamp-linux-x64 | ||
mkdir -p bin/dasm-$timestamp-linux-x86 | ||
mkdir -p bin/dasm-$timestamp-osx-x64 | ||
mkdir -p bin/dasm-$timestamp-osx-x86 | ||
mkdir -p bin/dasm-$timestamp-win-x64 | ||
mkdir -p bin/dasm-$timestamp-win-x86 | ||
|
||
cp -a machines/ bin/dasm-$timestamp-linux-x64/ | ||
cp -a machines/ bin/dasm-$timestamp-linux-x86/ | ||
cp -a machines/ bin/dasm-$timestamp-osx-x64/ | ||
cp -a machines/ bin/dasm-$timestamp-osx-x86/ | ||
cp -a machines/ bin/dasm-$timestamp-win-x64/ | ||
cp -a machines/ bin/dasm-$timestamp-win-x86/ | ||
|
||
cp -a bin/64bit/dasm.Linux bin/dasm-$timestamp-linux-x64/dasm | ||
cp -a bin/32bit/dasm.Linux bin/dasm-$timestamp-linux-x86/dasm | ||
cp -a bin/64bit/dasm.macOS bin/dasm-$timestamp-osx-x64/dasm | ||
cp -a bin/32bit/dasm.macOS bin/dasm-$timestamp-osx-x86/dasm | ||
cp -a bin/64bit/dasm.exe bin/dasm-$timestamp-win-x64/dasm.exe | ||
cp -a bin/32bit/dasm.exe bin/dasm-$timestamp-win-x86/dasm.exe | ||
|
||
cd bin/dasm-$timestamp-linux-x64 | ||
tar -zcvf ../../snapshot-builds/dasm-$timestamp-linux-x64.tar.gz * | ||
cd ../dasm-$timestamp-linux-x86 | ||
tar -zcvf ../../snapshot-builds/dasm-$timestamp-linux-x86.tar.gz * | ||
cd ../dasm-$timestamp-osx-x64 | ||
tar -zcvf ../../snapshot-builds/dasm-$timestamp-osx-x64.tar.gz * | ||
cd ../dasm-$timestamp-osx-x86 | ||
tar -zcvf ../../snapshot-builds/dasm-$timestamp-osx-x86.tar.gz * | ||
cd ../dasm-$timestamp-win-x64 | ||
tar -zcvf ../../snapshot-builds/dasm-$timestamp-win-x64.tar.gz * | ||
cd ../dasm-$timestamp-win-x86 | ||
tar -zcvf ../../snapshot-builds/dasm-$timestamp-win-x86.tar.gz * | ||
|
||
# cd back to dasm root | ||
cd ../.. | ||
|
||
# add the snapshots builds | ||
git add snapshot-builds/. | ||
|
||
# commit and push back to branch | ||
git commit -m "Added snapshot builds - $timestamp" | ||
git push origin $1 |