Skip to content

Commit

Permalink
Merge branch 'release/1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
coord-e committed Mar 5, 2022
2 parents c632104 + 46b5e75 commit 93f4461
Show file tree
Hide file tree
Showing 31 changed files with 561 additions and 1,379 deletions.
40 changes: 18 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ name: Release
jobs:
test:
name: Test
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- run: sudo apt-get install -y musl-tools busybox-static
- uses: actions/cache@v2
with:
toolchain: stable
target: x86_64-unknown-linux-musl
default: true
- run: sudo apt-get install -y musl-tools
path: |
target/
~/.cargo/git/db/
~/.cargo/registry/cache/
~/.cargo/registry/index/
key: "${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}"
- uses: actions-rs/cargo@v1
with:
command: build
Expand All @@ -30,30 +33,23 @@ jobs:
path: ./target/x86_64-unknown-linux-musl/release/magicpak
build_docker_images:
name: Build and push docker images
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: musl-executable
- run: docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
- run: PUSH_IMAGES=true ./dockerfile/build.sh ./magicpak
test_examples:
name: Test examples
runs-on: ubuntu-18.04
needs: build_docker_images
steps:
- uses: actions/checkout@v2
- name: Build examples
run: |
for example in ./example/*; do
docker build "$example"
done
- uses: docker/setup-buildx-action@v1
- run: ./dockerfile/build.sh ./magicpak
env:
PUSH_IMAGES: true
DOCKER_BUILD: "docker buildx build --load --cache-from type=gha --cache-to type=gha,mode=max"
release:
name: Release
runs-on: ubuntu-18.04
needs: test_examples
runs-on: ubuntu-20.04
needs: build_docker_images
steps:
- uses: actions/download-artifact@v2
with:
Expand All @@ -66,7 +62,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
upload:
name: Upload to crates.io
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: release
steps:
- uses: actions/checkout@v2
Expand Down
35 changes: 21 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@ name: Test and Lint
jobs:
test:
name: Test
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
target: [x86_64-unknown-linux-musl]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- run: sudo apt-get install -y musl-tools busybox-static
- uses: actions/cache@v2
with:
toolchain: stable
target: ${{ matrix.target }}
default: true
- run: sudo apt-get install -y musl-tools
path: |
target/
~/.cargo/git/db/
~/.cargo/registry/cache/
~/.cargo/registry/index/
key: "${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}"
- uses: actions-rs/cargo@v1
with:
command: build
Expand All @@ -32,39 +35,43 @@ jobs:
args: --release --all-features --target=${{ matrix.target }}
fmt:
name: Rustfmt
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- -D warnings
test_examples:
name: Test examples
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: musl-executable
- uses: docker/setup-buildx-action@v1
- name: Build docker images
run: IMAGE_PREFIX=test-magicpak/ PUSH_IMAGES=false ./dockerfile/build.sh ./magicpak
- name: Build examples
env:
IMAGE_PREFIX: test-magicpak/
PUSH_IMAGES: false
DOCKER_BUILD: "docker buildx build --load --cache-from type=gha --cache-to type=gha,mode=max"
run: |
for example in ./example/*; do
sed -e 's/FROM magicpak/FROM test-magicpak/' -i "$example/Dockerfile"
grep 'FROM magicpak' "$example/Dockerfile" && exit 1 || true
docker build "$example"
IMAGE=$(head -1 "$example/Dockerfile" | sed -e 's/FROM \(.*\)/\1/')
IMAGE_FILTER=$IMAGE ./dockerfile/build.sh ./magicpak
done
- name: Build examples
run: for example in ./example/*; do docker build "$example"; done
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file.

## [1.3.0] - 2022-01-11

- Fix busybox_jail_path file permissions ([#6](https://github.com/coord-e/magicpak/pull/6))
- Update and renew dependencies ([#7](https://github.com/coord-e/magicpak/pull/7))
- Fix usage of ExitStatus::from_raw and remove Error::DynamicSignaled ([#9](https://github.com/coord-e/magicpak/pull/9))
- Several CI fixes ([#8](https://github.com/coord-e/magicpak/pull/8), [#10](https://github.com/coord-e/magicpak/pull/10))
- This changed how `busybox` installed in the container images

## [1.2.0] - 2021-01-11

- Fixed infinite recursion caused by mutually dependent shared libraries. (#[3](https://github.com/coord-e/magicpak/pulls/3))
Expand Down
Loading

0 comments on commit 93f4461

Please sign in to comment.