Skip to content

Commit

Permalink
fix: update CI download
Browse files Browse the repository at this point in the history
gh tool is not needed anymore, removed.
  • Loading branch information
mpolitzer committed Aug 14, 2023
1 parent 0da92e4 commit d00f164
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 15 deletions.
42 changes: 29 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,12 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Download linux
run: >
gh release download -D dep/ -R ${{ github.repository_owner }}/linux v${{ env.KERNEL_VERSION }} --archive=tar.gz
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}

- name: Download riscv-pk
run: >
gh release download -D dep/ -R ${{ github.repository_owner }}/riscv-pk v${{ env.RISCV_PK_VERSION }} --archive=tar.gz
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
- name: Download dependencies
run: make download checksum

- name: Build docker image
id: docker_build
Expand Down Expand Up @@ -80,6 +72,30 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}

- name: Upload [linux-headers-${{ env.KERNEL_VERSION }}.tar.xz]
uses: actions/upload-artifact@v3
with:
name: linux-headers-${{ env.KERNEL_VERSION }}.tar.xz
path: linux-headers-${{ env.KERNEL_VERSION }}.tar.xz

- name: Upload [linux-nobbl-${{ env.KERNEL_VERSION }}.bin]
uses: actions/upload-artifact@v3
with:
name: linux-nobbl-${{ env.KERNEL_VERSION }}.bin
path: linux-nobbl-${{ env.KERNEL_VERSION }}.bin

- name: Upload [linux-${{ env.KERNEL_VERSION }}.bin]
uses: actions/upload-artifact@v3
with:
name: linux-${{ env.KERNEL_VERSION }}.bin
path: linux-${{ env.KERNEL_VERSION }}.bin

- name: Upload [linux-selftest-${{ env.KERNEL_VERSION }}.ext2]
uses: actions/upload-artifact@v3
with:
name: linux-selftest-${{ env.KERNEL_VERSION }}.ext2
path: linux-selftest-${{ env.KERNEL_VERSION }}.ext2

- name: Push docker image
id: docker_push
uses: docker/build-push-action@v2
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Changed
- Make kernel build timestamp deterministic
- Updated license/copyright notice in all source code
- Updated CI downloads to public infrastructure
- Updated CI actions versions

## [0.16.0] - 2023-03-30
### Changed
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

.PHONY: all build push run pull share copy clean clean-config checksum
.PHONY: all build download push run pull share copy clean clean-config checksum

TAG ?= devel
TOOLCHAIN_DOCKER_REPOSITORY ?= cartesi/toolchain
Expand Down Expand Up @@ -62,7 +62,7 @@ endif
.NOTPARALLEL: all
all: build copy

build: cartesi-linux-config checksum
build: cartesi-linux-config download
docker build -t $(IMG) $(BUILD_ARGS) .

push:
Expand Down Expand Up @@ -114,6 +114,8 @@ depclean: clean
checksum: $(KERNEL_SRCPATH) $(RISCV_PK_SRCPATH)
shasum -ca 256 shasumfile

download: $(KERNEL_SRCPATH) $(RISCV_PK_SRCPATH)

dep:
mkdir dep
$(KERNEL_SRCPATH): URL=https://github.com/cartesi/linux/archive/v${KERNEL_VERSION}.tar.gz
Expand Down

0 comments on commit d00f164

Please sign in to comment.